Defold 1.4.8 BETA

Defold 1.4.8 BETA

The latest beta is now released, and we invite those interested in beta testing the new features in the editor and engine to join now.

The beta period will be 2 weeks and the next planned stable release is two weeks from now.

Please report any engine issues in this thread or in issues using Help → Report Issue

Disclaimer

This is a BETA release, and it might have issues that could potentially be disruptive for you and your teams workflow. Use with caution. Use of source control for your projects is strongly recommended.

Access to the beta

Download the editor or bob.jar from Releases · defold/defold · GitHub

Set your build server to https://build-stage.defold.com

Special notes

The beta contains a BREAKING CHANGE:

  • #7450 Upgrade to OpenJDK 17
    Note that this does not affect the average user building and releasing games, but if you do build the engine or tools from source or if you do use the bob.jar command line tools you need to update to JDK 17.

A note on the version number: According to our version naming scheme a breaking change should typically increase the second digit of the version, in this case from a 4 to a 5, but since this change doesn’t affect the data formats or the average user for that matter we decided against going from 1.4.x to 1.5.0.

Release notes

Summary

  • BREAKING CHANGE: (#7450) Upgrade to OpenJDK 17
  • NEW: (#7508) Custom vertex formats
  • NEW: (#7739) Determine unmapped gamepad at runtime
  • NEW: (#7762) Add view, projection and aspect_ratio as camera properties
  • NEW: (#7746) Expose version information to editor extensions
  • NEW: (#7747) Add gui.get_tree()
  • NEW: (#7606) Individual materials for GUI nodes
  • FIX: (#7766) Particle effects crashfix
  • FIX: (#134) Fix crash when skeleton doesn’t have its version
  • FIX: (#7544) Bundle only specified architectures in HTML5 builds
  • FIX: (#7748) Show model’s Vertex Count in profiler for models in Local Vector Space
  • FIX: (#7760) Make sure to call the gui flipbook animation callback on single frame animations
  • FIX: (#7744) Implement lazy loading of the debugged app state
  • FIX: (#7770) Update JavaFX

Engine

BREAKING CHANGE: (#7450) Upgrade to OpenJDK 17
Breaking change: migrate editor and bob to JDK 17.

NEW: (#7508) Custom vertex formats
We have added support for passing custom data into vertices from a material or a sprite instance. While this functionality is similar to constants, using vertex attributes does not break batches. For example, the sprite component does not expose a color or tint property by default but with custom vertex attributes you can specify color values for specific sprites in your game.

The material editor can now be used to configure specific attributes for the associated vertex program.

The attributes are furthermore exposed for selected sprites in the outline, which then can be overridden per sprite component.

Currently, since this is the first iteration of this feature, it is only exposed to sprite components without any interaction from scripts but over time every component should be able to produce vertex data in the same way.

NEW: (#7739) Determine unmapped gamepad at runtime
A gamepad with no entry in the gamepads file will now report that it is unknown by setting the gamepad_unknown property in the gamepad action table in on_input.

NEW: (#7762) Add view, projection and aspect_ratio as camera properties
The view, projection and aspect ratio of a camera component are now available as properties on the component. The view and projection are read only using go.get(), while the aspect ratio can also be set using go.set().

local view = go.get("#camera", "view")
local projection = go.get("#camera", "projection")
local aspect_ratio = go.get("#camera", "aspect_ratio")
go.set("#camera", "aspect_ratio", 1.4)

NEW: (#7746) Expose version information to editor extensions
Editor scripts now can access the following variables:

  • editor.version — a version of Defold, e.g. 1.4.6
  • editor.engine_sha1 — a SHA1 of Defold engine
  • editor.editor_sha1 — a SHA1 of Defold editor

NEW: (#7747) Add gui.get_tree()
Added gui.get_tree(node) to get a table with a node and all of its children, exactly like gui.clone_tree() does, but without creating any new nodes.

local foo = gui.get_node("foo")
local tree = gui.get_tree(foo)
for id,node in pairs(tree) do
    print(id, node)
end

FIX: (#7766) Particle effects crashfix
Fixed a crash that occasionally happens a script is removed that started playing a particlefx with a state change callback.

FIX: (#134) Fix crash when skeleton doesn’t have its version
(PR https://github.com/EsotericSoftware/spine-runtimes/pull/2270 merged)

FIX: (#7544) Bundle only specified architectures in HTML5 builds
HTML5 bundles always included both asm.js and wasm binaries, even if the --architectures option specified only one architecture. This change makes sure to only include the specified architecture, and in the case when wasm is not included the engine loader will not attempt to load or stream it.

FIX: (#7748) Show model’s Vertex Count in profiler for models in Local Vector Space
Fix issue when models with Vector Space Local in its material aren’t taken into account by the profiler.

FIX: (#7760) Make sure to call the gui flipbook animation callback on single frame animations
Since Defold 1.3.1 single images in an atlas are not treated as implicit flipbook animations in a gui. This change saves resources, but it also has the unfortunate side-effect that calling gui.play_flipbook() on a single image will not invoke the callback if one is passed to gui.play_flipbook().

Editor

NEW: (#7606) Individual materials for GUI nodes
GUIs now has a list of materials that can be assigned to individual nodes, similar to textures, particles and fonts. If no material has been set on a node, the default GUI node material will be used.

Note: Assigning separate materials will break batching in the same manner as the regular GO world!

FIX: (#7744) Implement lazy loading of the debugged app state
How it’s implemented:

  1. EDN conversion in edn.lua is split into 2 parts: analyze and serialize. Analyze step collects a graph of reference data structures (tables, scripts) up to a certain depth, and returns them along with “edge refs” — a map from pointer string to a reference data structure referenced by the collected subgraph, but will not be serialized. Those are the references the editor might ask about. Serialize step does not use edge refs, but it does use the subgraph returned by analyze to serialize Lua VM objects into EDN.
  2. mobdebug.lua tracks a cache of edge refs created by analyze step. This cache is written into when we serialize something to EDN when the debugger state is “suspended”, and it’s cleared when the execution resumes (i.e. on RUN, STEP, OVER, OUT and DONE). It also adds a new REF command that, given an edge reference pointer string (the editor has those), responds with another Lua VM object subgraph.
  3. The editor changes LuaStructure definition to include a connection to DebugSession. Then, when something tries to access the contents of a reference that is unknown to the LuaStructure, it loads it from the debugged game using the REF command.

Debugger is now more responsive when debugging games with a lot of state.

FIX: (#7770) Update JavaFX
editor no longer crashes when dragging multiple items at the same time.

20 Likes

and

Are amazing new features! Sounds like now we can do a much more things in GUI and even in GUI libraries, thanks!

12 Likes

:face_with_monocle: Interesting. When are the matrices updated?

The matrices are update each frame when the camera component update is called in the engine:

I guess the question is if this runs before or after script component updates? Component types are registered with their priorities here:

Script has a lower prio than camera. Does a lower prio mean that it updated before a higher prio or is it vice versa? @JCash is better at the update loop than I am and will be able to give a good answer I think.

3 Likes

Yes, the components are sorted in ascending order. Lower priority are updated first.

3 Likes

OK, so once per frame, when the camera sends its message to the render script. :handshake: Thanks!

Shoot, does that mean the new view/projection properties are only valid for the active camera (with focus)? That really blocks a chunk of the useful functionality, including one of my planned uses for these new properties. (essentially, to be able to use spare inactive cameras to setup objects relative to a viewpoint different than the current one)

The properties are per camera component.

3 Likes

Seeing a near-100% error when attempting to bundle a game for Android that uses extension-facebook.
Info:
Running Defold editor/engine 5ab36f5 on M1 Macbook, build server https://build-stage.defold.com, OpenJDK 17.0.2+8 (slightly unsure about that, as I see a different version & path mentioned in the build log)

Steps:

  1. Create an empty project
  2. Add https://github.com/defold/extension-facebook/archive/refs/heads/master.zip as a dependency
  3. Bundle for Android with default options

Result:
com.dynamo.bob.MultipleCompileException: Build error

Log attached:
log.txt (26.6 KB)

Building/bundling with bob.jar seems to work ok.

Assuming it’s as simple as changing ‘compile’ to ‘implementation’ in the extension’s build.gradle, will that cause compatibility issues with earlier Defold versions?

2 Likes

It should not matter since we aren’t building using gradle. We only use gradle to resolve dependencies.

We do run builds of a whole bunch of extensions (Facebook among others) for stable, beta and alpha, but there is no error on beta:

BUT if you look at the actual extension-facebook test for beta there is an error in the log!

@JCash remind me to look into this tomorrow.

1 Like

Are those available only in Vertex Programs or can those attributes be available somehow in Fragment Programs?

Yes, through “varyings” like all other attributes

2 Likes

when the next version does release will the engine automaticaly update or do we have to do that for ourselves?

The beta period is usually two weeks. This beta will become the next stable release on Monday the 17th of July.

1 Like

I have a fix for the unhelpful MultipleCompileException error:

This should be merged tomorrow.

Yes, that should be it. The docs also mention adding a new repo:

Like this:

repositories {
   mavenCentral() 
}
1 Like

Merged into dev and the current beta. There will be a new beta version in 30-40 minutes.

1 Like

I am using

  • NEW: (#7606 ) Individual materials for GUI nodes

but I am getting an error related to the material “gui_back”, which is a custom material I set on some nodes in a .gui file (not the default material) during the bundling process.

java.io.IOException: File project_root\build\default\gui_back does not exists

at com.dynamo.bob.archive.ArchiveEntry.<init>(ArchiveEntry.java:45)

at com.dynamo.bob.archive.ArchiveBuilder.add(ArchiveBuilder.java:72)

at com.dynamo.bob.archive.ArchiveBuilder.add(ArchiveBuilder.java:80)

at com.dynamo.bob.pipeline.GameProjectBuilder.createArchive(GameProjectBuilder.java:229)

at com.dynamo.bob.pipeline.GameProjectBuilder.build(GameProjectBuilder.java:573)

at com.dynamo.bob.Project.runTasks(Project.java:1604)

at com.dynamo.bob.Project.createAndRunTasks(Project.java:1299)

at com.dynamo.bob.Project.doBuild(Project.java:1409)

at com.dynamo.bob.Project.build(Project.java:698)

at editor.pipeline.bob$run_commands_BANG_$fn__52292.invoke(bob.clj:150)

at editor.pipeline.bob$run_commands_BANG_.invokeStatic(bob.clj:149)

at editor.pipeline.bob$bob_build_BANG_.invokeStatic(bob.clj:224)

at editor.disk$async_bob_build_BANG_$fn__53398$fn__53401$fn__53402.invoke(disk.clj:227)

at clojure.core$binding_conveyor_fn$fn__5739.invoke(core.clj:2030)

at clojure.lang.AFn.call(AFn.java:18)

at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)

at java.base/java.lang.Thread.run(Thread.java:833)

I tried both https://build-stage.defold.com and https://build.defold.com as the build server

2 Likes

I’m also able to reproduce this. We’ll look into it!

1 Like

GJ!
I look forward to having it for models :slight_smile:

1 Like

There’s apparently an issue with the 1.4.8 release which may result in a mix-up of material use when rendering:

It is unfortunate that we did not catch this during the beta. We’ll look into it and see if we can issue a hotfix.

4 Likes