Defold 1.4.8 has been released

Special notes

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.

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.

21 Likes

Update from 1.4.6 to 1.4.8 [FIXED]
Project not workd when build from editor after update:(
Bundle worked.

Need help:)

2 Likes

It looks shader related (given your build errors in your ticket)
In this release we’ve worked on vertex formats, so I’m guessing that’s related.

3 Likes

I downloaded this update and every time I try to upload a file into a tile source or tile map, the mouse turns into a loading rainbow circle thing and I can’t click anything. I also let it load for a long time and experimented with smaller and bigger files, and it still ended up this way. What do I do, it’s frustrating when I can’t upload my tilesets.

After updating to 1.4.8, who use Spine extension don’t forget to update to the latest version also.

2 Likes

I noticed while testing something a bit ago that the Runner sample project needs the Spine extension dependency updated. Not sure if it is appropriate for me to put in a pull request for these kinds of things when I come across them, but I don’t mind doing so since I’ve already cloned the repo.

3 Likes

Please do, it is easy to forget these things.

4 Likes

Tested a bit. Works so good.

Hopefully in the next iterations there will be access from the code. To animate values or just set new values for dynamically created objects.


Common sprite shader for who wants to add tint/color attributes:
sprite.vp

uniform highp mat4 view_proj;

// positions are in world space
attribute highp vec4 position;
attribute mediump vec2 texcoord0;
attribute mediump vec4 color;

varying mediump vec2 var_texcoord0;
varying lowp vec4 var_color;

void main()
{
    gl_Position = view_proj * vec4(position.xyz, 1.0);
    var_texcoord0 = texcoord0;
    var_color = vec4(color.xyz * color.w, color.w);
}

sprite.fp

varying mediump vec2 var_texcoord0;
varying lowp vec4 var_color;

uniform lowp sampler2D texture_sampler;
uniform lowp vec4 tint;

void main()
{
    // Pre-multiply alpha since all runtime textures already are
    lowp vec4 tint_pm = vec4(tint.xyz * tint.w, tint.w);
    gl_FragColor = texture2D(texture_sampler, var_texcoord0.xy) * tint_pm * var_color;
}

10 Likes

Great to hear! Yeah that will come at some point, need to figure out the ins and outs of the api, but first we want to add support for more components

5 Likes

I tried running this on OSX 10.13.6 and did get an error, I wondered if you were continuing to support the older mac versions ? 1.4.7 is still working fine for me. thanks

INFO:TOOLS: Launcher version 504de7800fa81847bfc2e26a21973899db9dd747

DEBUG:TOOLS: arg 0: /Applications/Defold.app/Contents/Resources/packages/jdk-17.0.5+8/bin/java

DEBUG:TOOLS: arg 1: -cp

DEBUG:TOOLS: arg 2: /Applications/Defold.app/Contents/Resources/packages/defold-7a26e44ba65cdefe580af2e199833478fc49472b.jar

DEBUG:TOOLS: arg 3: -Xdock:icon=/Applications/Defold.app/Contents/Resources/logo.icns

DEBUG:TOOLS: arg 4: -Xdock:name=Defold

DEBUG:TOOLS: arg 5: -Dfile.encoding=UTF-8

DEBUG:TOOLS: arg 6: -Djna.nosys=true

DEBUG:TOOLS: arg 7: -Ddefold.launcherpath=/Applications/Defold.app/Contents/MacOS/Defold

DEBUG:TOOLS: arg 8: -Ddefold.resourcespath=/Applications/Defold.app/Contents/Resources

DEBUG:TOOLS: arg 9: -Ddefold.version=1.4.8

DEBUG:TOOLS: arg 10: -Ddefold.editor.sha1=7a26e44ba65cdefe580af2e199833478fc49472b

DEBUG:TOOLS: arg 11: -Ddefold.engine.sha1=504de7800fa81847bfc2e26a21973899db9dd747

DEBUG:TOOLS: arg 12: -Ddefold.buildtime=2023-07-17T16:06:12.143105

DEBUG:TOOLS: arg 13: -Ddefold.channel=editor-alpha

DEBUG:TOOLS: arg 14: -Ddefold.archive.domain=d.defold.com

DEBUG:TOOLS: arg 15: -Djava.net.preferIPv4Stack=true

DEBUG:TOOLS: arg 16: -Dsun.net.client.defaultConnectTimeout=30000

DEBUG:TOOLS: arg 17: -Dsun.net.client.defaultReadTimeout=30000

DEBUG:TOOLS: arg 18: -Djogl.texture.notexrect=true

DEBUG:TOOLS: arg 19: -Dglass.accessible.force=false

DEBUG:TOOLS: arg 20: --illegal-access=warn

DEBUG:TOOLS: arg 21: --add-opens=java.base/java.lang=ALL-UNNAMED

DEBUG:TOOLS: arg 22: --add-opens=java.desktop/sun.awt=ALL-UNNAMED

DEBUG:TOOLS: arg 23: --add-opens=java.desktop/sun.java2d.opengl=ALL-UNNAMED

DEBUG:TOOLS: arg 24: --add-opens=java.xml/com.sun.org.apache.xerces.internal.jaxp=ALL-UNNAMED

DEBUG:TOOLS: arg 25: --add-opens=java.base/sun.nio.fs=ALL-UNNAMED

DEBUG:TOOLS: arg 26: --add-opens=java.desktop/sun.awt.image=ALL-UNNAMED

DEBUG:TOOLS: arg 27: -Xmx9663676416

DEBUG:TOOLS: arg 28: com.defold.editor.Main

DEBUG:TOOLS: arg 29: (null)

Picked up JAVA_TOOL_OPTIONS:

Picked up _JAVA_OPTIONS:

OpenJDK 64-Bit Server VM warning: Ignoring option --illegal-access=warn; support was removed in 17.0

2023-07-27 12:41:35.465 WARN default javafx - Unsupported JavaFX configuration: classes were loaded from 'unnamed module @29832b43'

dyld: lazy symbol binding failed: Symbol not found: _objc_alloc_init

Referenced from: /Users/steventhomas/.openjfx/cache/21-ea+23/x86_64/libprism_es2.dylib (which was built for Mac OS X 11.0)

Expected in: /usr/lib/libobjc.A.dylib

dyld: Symbol not found: _objc_alloc_init

Referenced from: /Users/steventhomas/.openjfx/cache/21-ea+23/x86_64/libprism_es2.dylib (which was built for Mac OS X 11.0)

Expected in: /usr/lib/libobjc.A.dylib
1 Like

It is at least unintentional, but we need to investigate what it would take to continue supporting older macOS versions. Could you please create a bug report on GitHub?

1 Like

bug report created, thanks

3 Likes

hmm, not sure if it depends on this or not, but I’ve noticed that my old xbox-360 gamepad hasn’t worked since version 1.4.8. (and worked fine in previous versions).

1 Like

There’s a fix for this in the 1.5.0 beta: https://github.com/defold/defold/pull/7852

2 Likes