⇠ More posts

Defold release 1.4.8

By Björn Ritzl on Jul 18, 2023

Tagged as: Release notes


Defold 1.4.8

The release 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.

image

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

Screenshot 2023-07-03 at 15 31 35

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.