Defold 1.12.4 Beta
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 GitHub: Release v1.12.4 - beta · defold/defold · GitHub
Summary
- NEW: (#6519) Shader precision options (by Jhonnyg)
- NEW: (#11750) Increase number of texture units per draw from 8 to 16 (by Jhonnyg)
- NEW: (#12032) Deprecate the legacy LiveUpdate APIs (by AGulev)
- NEW: (#10478) Add glTF validator (by Jhonnyg)
- NEW: (#11697) Fix build error source links for embedded resources (by AGulev)
- NEW: (#11828) Improved Scene View manipulator performance (by matgis)
- NEW: (#3893,#12171) Update editor JGit dependency to version 7.6.0 (by matgis)
- NEW: (#11185,#8840) Free camera mode in scene view + enhanced camera controls (by JosephFerano)
- FIX: (#11845) Shut down the engine gracefully when creating a model component with model and rig are excluded (by britzl)
- FIX: (#12078) Cleanup of missing argument types etc in our api documentation (by JCash)
- FIX: (#9647) Fix for models with multiple meshes and mixed coordinate spaced materials (by Jhonnyg)
- FIX: (#12031,#9045,#10327) Allow the sound system to grow its used memory to increase the sound speed limit and fix possible crashes (by AGulev)
- FIX: (#12097) Added type safety to the graphics context handle (by JCash)
- FIX: (#12107) Exclude unused code from the HTML5 build to reduce binary size (by AGulev)
- FIX: (#12110) Fix for uniform buffers on WebGPU (by JCash)
- FIX: (#11196) Don’t apply skinning twice (by Jhonnyg)
- FIX: (#12114) Updated to Zip v0.3.8 and miniz 3.1.0 (by JCash)
- FIX: (#12127) Remove unsupported luasocket functionality from HTML5 build (by AGulev)
- FIX: (#12138) Optimize sprite culling (by ekharkunov)
- FIX: (#8088) Store frustum has in render items to avoid already calculated culling (by Jhonnyg)
- FIX: (#12136) Cache the text layout to speed up text rendering (by AGulev)
- FIX: (#8899) Avoid deadlocks when the profiler stack is unbalanced (by AGulev)
- FIX: (#11913) Switching the atlas in a sprite no longer throws an error if the current animation doesn’t exist in the new atlas (by AGulev)
- FIX: (#12141) Fixed crash when calling
model.play_anim()with an animation that is not present in the model (by AGulev) - FIX: (#12134) Show a Lua error when attempting to set the render target size <= 0 (by AGulev)
- FIX: (#11572) Update GUI nodes if the texture has been replaced from a script (by AGulev)
- FIX: (#12154) Fix occasional freezes on load in debug builds (by AGulev)
- FIX: (#12093) Fix Box2D 3.1 trigger enter/exit when one collision object overlaps several triggers (by aglitchman)
- FIX: (#12181) Display a warning when a profiler scope overflow occurs (by AGulev)
- FIX: (#12189) Fixed an issue where HTTP requests could stall during app restart (by AGulev)
- FIX: (#12190) Add the ability to increase the maximum sample count in the profiler (by AGulev)
- FIX: (#12191) Windows fix for file operations using Unicode paths (by JCash)
- FIX: (#12187) Apply filter params when uploading texture data (by Jhonnyg)
- FIX: (#10552) Add check for ES2/WebGL1 shaders that highp is supported in shaders (by Jhonnyg)
- FIX: (#11951) Add xdg-open fallback on Linux when attempting to open a link in the browser (by JosephFerano)
- FIX: (#11054) Apply skeleton transforms for orphaned joints (by Jhonnyg)
- FIX: (#11524,#11643) Fix glb rendering issue (by JosephFerano)
- FIX: (#12106) Allow go.property() only in .script files (by vlaaad)
- FIX: (#12025) Insert call arguments for LSP completions (by vlaaad)
- FIX: (#9430) Fix build error log parse exception (by vlaaad)
- FIX: (#8570,#3660) Replace SSDP/UPnP target discovery with mDNS/DNS-SD for Defold debug targets (by AGulev)
Engine
NEW: (#6519) ‘Shader precision options’ by Jhonnyg
Two new game.project options have been added that controls how the default type precision for floats and ints are generated for GLSL ES shaders:
shader.glsl_es_default_precision_float = highp | mediump
shader.glsl_es_default_precision_int = highp | mediump
These will affect how the global type qualifiers are generated in the cross-compiled shaders:
#version 300 es
precision highp float;
precision mediump int;
NEW: (#11750) ‘Increase number of texture units per draw from 8 to 16’ by Jhonnyg
Max texture units a draw call can reference has been increased from 8 to 16.
NEW: (#12032) ‘Deprecate the legacy LiveUpdate APIs’ by AGulev
We are deprecating old LiveUpdate functionality in favor of mount/archive-based Live Update workflows.
The following Lua API has been deprecated:
liveupdate.get_current_manifest()
liveupdate.store_resource()
liveupdate.store_manifest()
liveupdate.store_archive()
liveupdate.is_using_liveupdate_data()
collectionproxy.missing_resources()
resource.* aliases for these APIs have been removed:
resource.get_current_manifest()
resource.is_using_liveupdate_data()
resource.store_resource()
resource.store_manifest()
resource.store_archive()
The deprecated API still works, giving users of the old Live Update time to migrate before it is removed later this year. However, it has been removed from the documentation, and some functionality has changed.
First, manifest signing keys are no longer part of the pipeline, which means:
bob.jarno longer accepts--manifest-private-keyor--manifest-public-keygame.public.deris no longer generated or bundled, and thepublickeyandprivatekeyfields inliveupdate.settingsare now deprecated and unused- At runtime, deprecated Live Update manifest and archive validation now check only supported engine versions instead of using bundled public/private key signatures
This change reduces the engine’s build size (for example, from 2,339,290 bytes to 2,423,041 bytes for a WASM release build, about ~3.6%).
Second, archive builds now include a new Live Update setting, Strip Live Update Entries from Main Manifest in game.project (liveupdate.exclude_entries_from_main_manifest), enabled by default.
When this option is enabled for archive builds that publish Live Update content, liveupdate-only resources are excluded from the bundled game.dmanifest, while the published liveupdate.game.dmanifest still contains the full resource list required for remote content delivery. Disable this setting only if you need the deprecated behavior where excluded entries remain in the bundled game.dmanifest. This reduces build size and runtime memory usage, especially for projects with a large number of resources in Live Update archives.
This option is enabled by default because mount/archive-based Live Update workflows are highly dynamic and users can replace archive content at any time, manifest data cannot be relied upon for resources excluded during the bundle build.
For the same reason, collectionproxy.missing_resources() is now deprecated, as it depends on manifest data to detect excluded resources. It can be partially replaced by collectionproxy.get_resources(), which now returns an empty table {} when no collection exists in any mounted archive and Strip Live Update Entries from Main Manifest checked, indicating that the required archive has not been mounted yet.
FIX: (#11845) ‘Shut down the engine gracefully when creating a model component with model and rig are excluded’ by britzl
This fixes a crash when trying to create a model component with model and rig excluded using an app manifest. The engine will now shut down gracefully and the log will show that the operation is not supported:
WARNING:RESOURCE: Unable to create resource: /_generated_90739376.modelc: NOT_SUPPORTED
WARNING:RESOURCE: Unable to create resource: /_generated_1f27f107.goc: NOT_SUPPORTED
ERROR:GAMEOBJECT: Could not instantiate game object from prototype /_generated_1f27f107.goc.
WARNING:RESOURCE: Unable to create resource: /main/game/game.collectionc: FORMAT_ERROR
FIX: (#12078) ‘Cleanup of missing argument types etc in our api documentation’ by JCash
Some parts of the C++ api generation was missing some type information.
Fixes to our internal scripts also now make it easier to spot such errors.
FIX: (#9647) ‘Fix for models with multiple meshes and mixed coordinate spaced materials’ by Jhonnyg
Models that use .gltf files that use materials with different coordinate spaces can now be batched correctly.
FIX: (#12031,#9045,#10327) ‘Allow the sound system to grow its used memory to increase the sound speed limit and fix possible crashes’ by AGulev
Compile-time assumptions about how large audio buffers need to be for all sounds created limitations on the playback speed that could be applied and on the sound quality that could be played safely. For example, playing a 384 kHz sound could crash on a device with a 44 kHz output rate. A similar issue existed for playback speed: increasing the speed requires more decoded data to be fed into the resampler, and the sound system could end up with a buffer that was too small, which could also cause a crash.
To fix this, the sound system can now grow its scratch buffers dynamically to ensure that enough data fits when needed. This fixes crashes in those situations and also allows the maximum speed limit to be increased from 5 to 50. It still makes sense to use reasonable sound sample rates, such as 44 kHz, since higher rates increase runtime memory usage as well as using high speed sounds. To help track that memory usage, a new Sound System section has been added to the profiler.
FIX: (#12097) ‘Added type safety to the graphics context handle’ by JCash
This fixes a regression where the WebGPU backend used the wrong information to setup its context, resulting in erroneous rendering.
FIX: (#12107) ‘Exclude unused code from the HTML5 build to reduce binary size’ by AGulev
Even though http_service.cpp and provider_http.cpp were unused in HTML5, they were accidentally included in the HTML5 binary.
Excluding them reduces the HTML5 release build from 2 604 862 bytes to 2 469 942 bytes, saving 134 920 bytes (~5.2%)
FIX: (#12110) ‘Fix for uniform buffers on WebGPU’ by JCash
This fixes some uninitialized memory and handling of cached states that was introduced in 1.12.2.
FIX: (#11196) ‘Don’t apply skinning twice’ by Jhonnyg
An issue has been fixed where world transforms are applied twice for static non-skinned meshes that are anchored to skeletal bones. Essentially, in some cases meshes would render in an incorrect position when playing an animation as opposed to the bind pose (i.e when no animation is playing).
FIX: (#12114) ‘Updated to Zip v0.3.8 and miniz 3.1.0’ by JCash
This allows us to use vanilla library files which will help keeping the library up-to-date.
We’ve also removed our zlib dependency, and instead rely on the miniz library, eliminating duplicate code. In doing this we can save on executable size.
On macOS, the combined savings of the libraries is roughly 40kb.
FIX: (#12127) ‘Remove unsupported luasocket functionality from HTML5 build’ by AGulev
TCP/UDP isn’t supported on the HTML5 platform with luasockets. Removing this functionality from the binary helps reduce the WASM binary size slightly (~1%)
FIX: (#12138) ‘Optimize sprite culling’ by ekharkunov
Sprite culling spends less time calculating visibility now. But memory footprint grows by 20 bytes per every sprite component.
FIX: (#8088) ‘Store frustum has in render items to avoid already calculated culling’ by Jhonnyg
The amount of time spent on frustum culling has been reduced when issuing multiple render.draw calls during a single frame.
FIX: (#12136) ‘Cache the text layout to speed up text rendering’ by AGulev
Text layout calculation is pretty expensive. To reduce its cost, we cache it once and reuse it until layout-related parameters change. This significantly speeds up text rendering (1.5x-4.5x, depending on the selected font system, classic or dynamic fonts), but increases memory consumption.
FIX: (#8899) ‘Avoid deadlocks when the profiler stack is unbalanced’ by AGulev
Fixes an issue where the engine may freeze if a user calls profiler.scope_begin("my_scope") without later closing it with profiler.scope_end(), or vice versa: closing without opening. In such cases, an error will be shown and scopes will be auto-closed at the moment of detection.
Also fixes occasional freezes when using profiler.dump_frame().
FIX: (#11913) ‘Switching the atlas in a sprite no longer throws an error if the current animation doesn’t exist in the new atlas’ by AGulev
Switching the atlas previously showed an error when an animation didn’t exist in the new atlas:
ERROR:GAMESYS: Atlas doesn’t contain animation ‘anim’. Animation ‘new_0’ will be used
This used to happen even when the next line after changing the atlas switched the animation, which made the error unnecessary and annoying.
FIX: (#12141) ‘Fixed crash when calling model.play_anim() with an animation that is not present in the model’ by AGulev
Fixed a crash when model.play_anim() is called without a callback and attempts to play an animation that doesn’t exist in the model.
FIX: (#12134) ‘Show a Lua error when attempting to set the render target size <= 0’ by AGulev
An attempt to set the render target size less than or equal to zero crashes the engine. This fix prevents it by showing a Lua error instead.
FIX: (#11572) ‘Update GUI nodes if the texture has been replaced from a script’ by AGulev
Fixed an issue where, when updating a texture in GUI, go.set() updates node parameters in debug builds but doesn’t update them in release builds.
FIX: (#12154) ‘Fix occasional freezes on load in debug builds’ by AGulev
Fixes an issue where the profiler may get stuck in a deadlock in some cases, which is easier to reproduce on Android.
FIX: (#12093) ‘Fix Box2D 3.1 trigger enter/exit when one collision object overlaps several triggers’ by aglitchman
2D physics with Box2D 3.1 could report wrong trigger enter/exit when one object overlapped more than one trigger at the same time. Exits were applied incorrectly to all overlaps of a body instead of only the pair that ended. This change fixes that tracking and adds a regression test. Sensor overlap queries used for collision callbacks also read overlap counts from Box2D correctly.
FIX: (#12181) ‘Display a warning when a profiler scope overflow occurs’ by AGulev
The app used to hang if the user made a mistake and created too many scopes. That made it hard to debug. Now the profiler warns the user about the problem.
This introduces a breaking change to the DMSDK API:
void ProfileSetThreadName(const char* name);
void ProfileScopeBegin(const char* name, uint64_t name_hash);
void ProfileFrameEnd(HProfile profile);
void ProfileScopeEnd(const char* name, uint64_t name_hash);
void ProfileLogText(const char* text, ...);
replaced with
ProfileResult ProfileSetThreadName(const char* name);
ProfileResult ProfileScopeBegin(const char* name, uint64_t name_hash);
ProfileResult ProfileFrameEnd(HProfile profile);
ProfileResult ProfileScopeEnd(const char* name, uint64_t name_hash);
ProfileResult ProfileLogText(const char* text, ...);
// The result can be one of the following values:
// PROFILE_RESULT_OK
// PROFILE_RESULT_NOT_INITIALIZED
// PROFILE_RESULT_OUT_OF_SAMPLES
FIX: (#12189) ‘Fixed an issue where HTTP requests could stall during app restart’ by AGulev
In some cases, an application restart could not complete an ongoing HTTP request, which could result in the app freezing.
FIX: (#12190) ‘Add the ability to increase the maximum sample count in the profiler’ by AGulev
Added profiler.max_sample_count to game.project to allow using more than the default 4096 samples, which can be useful in rare cases.
FIX: (#12191) ‘Windows fix for file operations using Unicode paths’ by JCash
This fixes issues when a folder or a filename contain Unicode characters.
E.g. you could see Failed get application support path due to invalid conversions.
FIX: (#12187) ‘Apply filter params when uploading texture data’ by Jhonnyg
Fixed an issue where updating font data in OpenGL changes texture filtering parameters but didn’t update the sampler dirty state. This caused a mismatch between the expected filtering state since the sampler settings were never applied.
Editor
NEW: (#10478) ‘Add glTF validator’ by Jhonnyg
The glTF validation tool has been integrated into the asset pipeline. Building / loading a project with faulty glTF files will output errors now that needs to be addressed before they can be used in Defold. Usually, the quickest route to fixing the content is to re-export them via Blender (https://www.blender.org/).
Note: Validating .gltf files inside an archive (e.g project dependency) does not validate external buffers and/or textures.
NEW: (#11697) ‘Fix build error source links for embedded resources’ by AGulev
Build errors coming from embedded resources now consistently open the owning file instead of ending up with an unknown or missing source.
NEW: (#11828) ‘Improved Scene View manipulator performance’ by matgis
We now defer committing changes to the graph until the drag operation has completed when using Scene View manipulators. This can significantly improve responsiveness when the manipulated objects are referenced from a large number of scenes. An unfortunate downside of this new approach is that you won’t see the drag reflected across multiple open tabs in Split View until you complete the drag.
NEW: (#3893,#12171) ‘Update editor JGit dependency to version 7.6.0’ by matgis
It seems the old version of JGit we were using has trouble with some repositories created by newer Git versions.
See: 581723 – DirCache.read fails with DIRC checksum mismatch on git 2.40
NEW: (#11185,#8840) ‘Free camera mode in scene view + enhanced camera controls’ by JosephFerano
We have added a new 3D perspective free camera mode for navigating scenes! Click and hold the right mouse button to activate and move around with the WASD keys. There is a scene view popup on the perspective camera button with additional controls for the camera. The left mouse button controls (orbit, zoom, pan) now warp around the editor window to allow you to keep going forever. There are also several smaller improvements, like smoother zooming and localization for the grid menu.
Shoutout to @sprocketc who started the PR and @delinx who contributed his winapi know-how to the mouse_capture_windows.cpp module.
FIX: (#10552) ‘Add check for ES2/WebGL1 shaders that highp is supported in shaders’ by Jhonnyg
ES2/WebGL1 shaders that have specified highp as the default precision qualifier might not work on all devices since highp for fragment shaders is not guaranteed to work on ES2.
To fix this, the shader build pipeline now patches the cross-compiled ES2 shaders with the following snippet:
#version 100 es
// If highp is specified as the default precision for floats:
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
// If highp is specified as the default precision for ints:
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp int;
#else
precision mediump int;
#endif
FIX: (#11951) ‘Add xdg-open fallback on Linux when attempting to open a link in the browser’ by JosephFerano
FIX: (#11054) ‘Apply skeleton transforms for orphaned joints’ by Jhonnyg
In the cases where animations coming from a .gltf file where the root node of a skeleton has non-identity transform, the skinned objects in the engine would not be correctly placed when animating.
NOTE: This could mean that your projects with skinned characters might be rotated, scaled or positioned differently now when animating. If this happens, you need to fix this in your authoring package (e.g Blender) and re-export the offending .gltf files!
FIX: (#11524,#11643) ‘Fix glb rendering issue’ by JosephFerano
Fixed issue on Linux and Macos where glb models weren’t being rendered correctly on systems with locales that use commas for decimal numbers.
FIX: (#12106) ‘Allow go.property() only in .script files’ by vlaaad
Both editor and bob will now only allow go.property() in .script files. It never worked in .lua files, but now it explicitly generates a build error.
As a side effect of this, the editor now loads faster on big proejcts, where it no longer needs to parse all .lua files for properties. On an example big project, the observed improvement in load time was 6% (1m31s → 1m25s).
FIX: (#12025) ‘Insert call arguments for LSP completions’ by vlaaad
Accepting Lua function completions from the Lua language server now inserts the call with parentheses and arguments instead of only the function name.
FIX: (#9430) ‘Fix build error log parse exception’ by vlaaad
FIX: (#8570,#3660) ‘Replace SSDP/UPnP target discovery with mDNS/DNS-SD for Defold debug targets’ by AGulev
Debug engine builds now advertise themselves over mDNS/DNS-SD using the _defold._tcp service and the editor now discovers debug targets through mDNS instead of SSDP/UPnP. iOS debug builds now publish the discovery service through Bonjour, so they can be discovered by the editor over the local network without an extra entitlements.
It fixes the issue that iOS targets can’t be discovered by the editor.
If you are using a custom Info.plist in your project, please make sure it is updated with the changes introduced in this version (new section):
{{^variant_release}}
<key>NSBonjourServices</key>
<array>
<string>_defold._tcp</string>
</array>
<key>NSLocalNetworkUsageDescription</key>
<string>Discover Defold targets on the local network.</string>
{{/variant_release}}

