Defold 1.10.1 has been released

Defold 1.10.1

Summary

  • BREAKING CHANGE: (#10454) Throw a Lua error if nil passed into go.delete() function (by AGulev)
  • NEW: (#10430) Faster LU archive creation + Added option for compression level. (by AGulev)
  • NEW: (#10442) Added dynamic profiling scope for extensions (by britzl)
  • NEW: (#10464) Resume HTML5 audio on “mouse down” and “touch start” events (by aglitchman)
  • NEW: (#9946) Added API to get AABB for models. (by ekharkunov)
  • NEW: (#10554) Added missing API docs to dmHashTable (by britzl)
  • NEW: (#10555) Added missing Gamepad API docs to dmHID (by britzl)
  • NEW: (#10576) Add a fallback if globalThis is missing (by britzl)
  • NEW: (#10378) Auto-insert closing parens in the code editor (by vlaaad)
  • NEW: (#10380) Add build server username/password prefs fields (by vlaaad)
  • NEW: (#10433) Introduce global console filtering toggle (by sprocketc)
  • NEW: (#10490) Do not autocomplete Lua code in comments (by AGulev)
  • NEW: (#10494) Add Project and Debug locations for editor script commands (by vlaaad)
  • NEW: (#10505) Option to hide the Changed File panel (by AGulev)
  • NEW: (#10512) Add editor shortcut keymap configuration (by vlaaad)
  • NEW: (#10537) Make it clear that some resources cannot be edited (by AGulev)
  • NEW: (#10560) Add LSP rename support (by vlaaad)
  • NEW: (#10570) Transform top selected nodes only (by sprocketc)
  • FIX: (#10307) Added support for .opus sound format (by thengel01)
  • FIX: (#10243) Sound system mixer rework (down sampling enablement and general optimizations) (by thengel01)
  • FIX: (#10394) Fontc now uses the ttf font input to determine if it’s monospaced (by JCash)
  • FIX: (#10544) Make sure the engine picks the best GPU (by AGulev)
  • FIX: (#10462) Use unique identifiers for factory-spawned game objects (by AGulev)
  • FIX: (#10496) Log error when vertex declaration doesn’t match the vertex data in Vulkan (by JCash)
  • FIX: (#10541) Use raw input for gamepads even if no gamepad is specified in the gamepad mappings (by AGulev)
  • FIX: (#10563) Faster way to unpack tools in Bob (by AGulev)
  • FIX: (#10558) Cleanup the input action table (by britzl)
  • FIX: (#10580) Fixed models not rendering in the editor in some situations (by matgis)
  • FIX: (#10556) Fix label drag issues (by sprocketc)
  • FIX: (#10495) Increased text contrast in diff view (by britzl)
  • FIX: (#10422) Consume the mouse event when clicking outside of the color popup (by sprocketc)
  • FIX: (#10373) Introduce code zoom on scroll preference (by sprocketc)
  • FIX: (#10363) Fix menu bar visibility on toolbar refresh (by sprocketc)
  • FIX: (#10469) Hide toolbars of inactive tabs (by sprocketc)
  • FIX: (#10476) Fix state when closing the inactive tab on split configurations (by sprocketc)
  • FIX: (#10492) Make it clear when a collision object shape is unnamed (by AGulev)
  • FIX: (#10491) Fixed the issue where horizontal scrolling in the text editor doesn’t account for changes in code font size (by AGulev)
  • FIX: (#10488) Fix the scale tool for rotated objects in the editor (by AGulev)
  • FIX: (#10533) Fixed the issue where transformation gizmos for models disappeared when “Component Guides” was turned off (by AGulev)
  • FIX: (#10561) Fix initial document-width calculation for tab-indented code files (by matgis)
  • FIX: (#10581) Hide reset button if some of the props are not overridable (by sprocketc)
  • FIX: (#10461) Create GUI dependencies on drop (by sprocketc)
  • FIX: (#10584) Correctly apply model material overrides in editor scene view (by matgis)

Engine

BREAKING CHANGE: (#10454) ‘Throw a Lua error if nil passed into go.delete() function’ by AGulev
:warning: Passing nil to go.delete() results in a Lua error, as this aligns with expected behavior and helps catch logical issues in the code.

NEW: (#10430) 'Faster LU archive creation + Added option for compression level. ’ by AGulev
A new option was added to the LiveUpdate settings: ZIP archive compression level, with levels ranging from 0 to 9.
The default level is 1 (the same as before the changes).
This option is useful in cases where compression is not needed at all—e.g., when Poki repacks the archive and applies their own compression. In such cases, using level 0 will significantly speed up archive creation and the bundling process.
Additionally, the archive writer itself was improved, making archive creation at least twice as fast (regardless of whether compression is used or not).

On a test suite with 172,296 files, which were used for benchmarking on a Mac M1 Pro Max:

  • Archive creation before changes (level 1 compression): 56 seconds
  • With performance improvements and default level 1 compression: 28 seconds
  • With performance improvements and level 0 compression: 1.8 seconds

NEW: (#10442) ‘Added dynamic profiling scope for extensions’ by britzl
Added per profiling scopes per extension update.

Example using profiler.dump_frame() shows the Extension scope and WebView, LiveUpdate and Profiler extensions:

INFO:PROFILER: Profiler threads:
INFO:PROFILER:     Thread 'sound': 0.000001
INFO:PROFILER:     'UpdateInternal': time: 0.001 ms self: 0.001 ms  count: 1
INFO:PROFILER:     Thread 'Main': 0.006706
INFO:PROFILER:     'Step': time: 6.706 ms self: 0.007 ms  count: 1
INFO:PROFILER:         'Frame': time: 6.699 ms self: 0.328 ms  count: 1
INFO:PROFILER:             'Sim': time: 0.563 ms self: 0.050 ms  count: 1
INFO:PROFILER:                 'Resource': time: 0.001 ms self: 0.001 ms  count: 1
INFO:PROFILER:                     'UpdateFactory': time: 0.000 ms self: 0.000 ms  count: 1
INFO:PROFILER:                         'JobThreadUpdate': time: 0.000 ms self: 0.000 ms  count: 1
INFO:PROFILER:                 'Hid': time: 0.207 ms self: 0.207 ms  count: 1
INFO:PROFILER:                 'JobThreadUpdate': time: 0.000 ms self: 0.000 ms  count: 1
INFO:PROFILER:                 'Extension': time: 0.082 ms self: 0.003 ms  count: 1
INFO:PROFILER:                     'WebView': time: 0.000 ms self: 0.000 ms  count: 1
INFO:PROFILER:                     'LiveUpdate': time: 0.001 ms self: 0.000 ms  count: 1
INFO:PROFILER:                         'LiveUpdate': time: 0.001 ms self: 0.001 ms  count: 1
INFO:PROFILER:                             'JobThreadUpdate': time: 0.000 ms self: 0.000 ms  count: 1
INFO:PROFILER:                     'Profiler': time: 0.078 ms self: 0.078 ms  count: 1
INFO:PROFILER:                 'Sound': time: 0.000 ms self: 0.000 ms  count: 1

NEW: (#10464) ‘Resume HTML5 audio on “mouse down” and “touch start” events’ by aglitchman
AudioContext now resumes on events ‘mouse down’ and ‘touch start’. Previously it was resuming on ‘mouse up’ and ‘touch end’ event and users hear the first sound with delay, i.e. only when they take their finger off the screen or mouse.

NEW: (#9946) ‘Added API to get AABB for models.’ by ekharkunov
Added new API to get AABB information from models:

  • model.get_aabb()
  • model.get_mesh_aabb()
    AABB information return in form of table with two fields min and max. Both of them has type vector3.
    Functions take 1 argument: url of the model component.

model.get_aabb() returns AABB information for the whole model in local coordinate space.
model.get_mesh_aabb() function returns a dictionary of AABB information for all meshes in the following form:

<hashed_mesh_id> = <aabb_information>

Usage example:
model.get_aabb()

model.get_aabb("#model") -> { min = vmath.vector3(-2.5, -3.0, 0), max = vmath.vector3(1.5, 5.5, 0) }

model.get_mesh_aabb()

model.get_mesh_aabb("#model") -> { hash("Sword") = { min = vmath.vector3(-0.5, -0.5, 0), max = vmath.vector3(0.5, 0.5, 0) }, hash("Shield") = { min = vmath.vector3(-0.5, -0.5, -0.5), max = vmath.vector3(0.5, 0.5, 0.5) } }

NEW: (#10554) ‘Added missing API docs to dmHashTable’ by britzl
Added missing API documentation for dmHashTable constructor, Clear, Capacity, Swap, Empty, Put, Erase and Iterate.

NEW: (#10555) ‘Added missing Gamepad API docs to dmHID’ by britzl
Added API documentation for GetGamepadPacket, GetGamepadButton and GetGamepadHat.

NEW: (#10576) ‘Add a fallback if globalThis is missing’ by britzl
The global object (ie globalThis) is not set in old browsers and code in dmLoader.js etc rely on it being present. This change makes sure the Window object is set as globalThis according to the specification.

FIX: (#10307) ‘Added support for .opus sound format’ by thengel01
We’ve added support for the .opus audio format.

It is a very effective compression, and is suitable for both music and sound effects.

As we are very conservative of the engine build size, we chose to add this support as an opt-in.
In order to add support for .opus files at runtime, you need to create an App Manifest and chose Include Sound Decoder Opus.

Similarly, it is now also possible to exclude the other decoders (.wav and .ogg) allowing you to slim down the engine size even further.

FIX: (#10243) ‘Sound system mixer rework (down sampling enablement and general optimizations)’ by thengel01
We’ve changed our sound resampler to support any sample rate.
The resampler now also supports SIMD code (SSE2 and wasm simd128) for better performance. It is currently enabled on platforms that support it , i.e. Windows, Linux, HTML5 and macOS (x64)

The change also reduces memory footprint than before.

FIX: (#10394) ‘Fontc now uses the ttf font input to determine if it’s monospaced’ by JCash
Previously, it was determined based on the output, but if the output was a single glyph, it was always determined as monospaced.

FIX: (#10544) ‘Make sure the engine picks the best GPU’ by AGulev
GLFW for Windows is now built with GLFW_USE_HYBRID_HPG enabled to export the NvOptimusEnablement and AmdPowerXpressRequestHighPerformance symbols, which force the use of the high-performance GPU on Nvidia Optimus and AMD PowerXpress systems.

FIX: (#10462) ‘Use unique identifiers for factory-spawned game objects’ by AGulev
All objects spawned with factories now have unique identifiers, which helps to avoid hidden issues

FIX: (#10496) ‘Log error when vertex declaration doesn’t match the vertex data in Vulkan’ by JCash

FIX: (#10541) ‘Use raw input for gamepads even if no gamepad is specified in the gamepad mappings’ by AGulev
Games which use only raw gamepad data will now receive input events even if the gamepad bindings file is empty.

FIX: (#10563) ‘Faster way to unpack tools in Bob’ by AGulev
This change speeds up unpacking of external tools and makes their use thread safe when using more than one thread.

FIX: (#10558) ‘Cleanup the input action table’ by britzl
If a mouse is connected the input action table always contains mouse position data even for input actions which are not related to the mouse. This change cleans up the input action table so that only values relevant to the input action is included:

  • Text Triggers will only include text
  • Key Triggers will include pressed, released, repeated and value
  • Mouse Triggers will include pressed, released, repeated, value, x, y, dx, dy, screen_x, screen_y, screen_dxandscreen_dy`
  • As always mouse movement is implicitly sent if a Mouse Trigger is set. It will include x, y, dx, dy, screen_x, screen_y, screen_dx, screen_dy` and accelerometer data if on mobile
  • Touch Triggers will include pressed, released, repeated, value, x, y, dx, dy, screen_x, screen_y, screen_dx, screen_dyandtouch`
  • Gamepad Triggers will include pressed, released, repeated, value, gamepad

Editor

NEW: (#10378) ‘Auto-insert closing parens in the code editor’ by vlaaad
record

NEW: (#10380) ‘Add build server username/password prefs fields’ by vlaaad
This changeset also adds a new prefs schema type in editor scripts: password, e.g.

function M.get_prefs_schema()
    return {["my-extension.third-party-api-key"] = editor.prefs.schema.password()}
end

Password schema behaves as a string schema, but the value is encrypted in the prefs file.

NEW: (#10433) 'Introduce global console filtering toggle ’ by sprocketc
A global filter toggle button was introduced to the console tab.

Screenshot From 2025-04-04 18-10-20

NEW: (#10490) ‘Do not autocomplete Lua code in comments’ by AGulev
The code editor will no longer try to auto-complete Lua code in comments.

NEW: (#10494) ‘Add Project and Debug locations for editor script commands’ by vlaaad
Now this editor script will work:

local M = {}

function M.get_commands()
    return {
        {
            label = "Project command",
            locations = {"Project"},
            run = function()
                print("Run project command")
            end
        },
        {
            label = "Debug command",
            locations = {"Debug"},
            run = function()
                print("Run debug command")
            end
        }
    }
end

return M

NEW: (#10505) ‘Option to hide the Changed File panel’ by AGulev
New option View -> Toggle Changed Files Pane that hides the Changed Files panel.

NEW: (#10512) ‘Add editor shortcut keymap configuration’ by vlaaad
We added the Keymap tab to the Preferences dialog — now it’s possible to configure editor command shortcuts from within the editor:
record

Assigning shortcuts to commands defined in editor scripts is now also possible. If a command defines an id, it will appear in the Keymap configuration table. Example editor script:

local M = {}
function M.get_commands()
  return {
    editor.command({
      label = "Print Git Status",
      locations = {"Project"},
      id = "vcs.print-git-status",
      run = function(opts)
        editor.execute("git", "status", {reload_resources=false})
      end
    })
  }
end
return M

Now you can assign a shortcut:
status

NEW: (#10537) ‘Make it clear that some resources cannot be edited’ by AGulev
The editor now displays a message indicating that changes to files from libraries cannot be saved.
CleanShot 2025-04-22 at 11 06 45@2x

NEW: (#10560) ‘Add LSP rename support’ by vlaaad
Now you can rename symbols in the code editor:
rename.gif

NEW: (#10570) ‘Transform top selected nodes only’ by sprocketc
Selected children of already selected parents should not be transformed.

FIX: (#10580) ‘Fixed models not rendering in the editor in some situations’ by matgis

  • Fixed an issue where model materials whose texture samplers were configured to use the project default filtering setting would not render in the editor viewport.
  • Fixed an issue where model materials whose shaders used attributes that were not declared in the material or present in the mesh data would not render in the editor viewport.

FIX: (#10556) ‘Fix label drag issues’ by sprocketc
Handle various label drag issues.

FIX: (#10495) ‘Increased text contrast in diff view’ by britzl
Increased text contrast on green background when showing change diffs.

Old:

CleanShot 2025-04-14 at 11 31 45@2x

New:

CleanShot 2025-04-14 at 11 29 26@2x

FIX: (#10422) ‘Consume the mouse event when clicking outside of the color popup’ by sprocketc
Clicking outside of a color picker popup should not propagate.

FIX: (#10373) ‘Introduce code zoom on scroll preference’ by sprocketc
Screenshot From 2025-03-24 14-23-03

FIX: (#10363) ‘Fix menu bar visibility on toolbar refresh’ by sprocketc
This fixes an occasional menu bar visibility issue, triggered by a toolbar refresh.

FIX: (#10469) ‘Hide toolbars of inactive tabs’ by sprocketc
This should hide all toolbars of inactive tabs.

FIX: (#10476) ‘Fix state when closing the inactive tab on split configurations’ by sprocketc

FIX: (#10492) ‘Make it clear when a collision object shape is unnamed’ by AGulev
Make sure it’s clear from the outline when physics shapes are unnamed (names are only needed for runtime operations):
CleanShot 2025-04-14 at 08 05 16@2x

FIX: (#10491) ‘Fixed the issue where horizontal scrolling in the text editor doesn’t account for changes in code font size’ by AGulev

FIX: (#10488) ‘Fix the scale tool for rotated objects in the editor’ by AGulev
The scale tool in the scene editor will now work regardless of how the object was initially rotated. Previously an object rotated exactly 90 degrees along any axis would not be possible to rotate using the scale tool.

FIX: (#10533) ‘Fixed the issue where transformation gizmos for models disappeared when “Component Guides” was turned off’ by AGulev

FIX: (#10561) ‘Fix initial document-width calculation for tab-indented code files’ by matgis
Fixed an issue where you could not scroll the code editor far enough horizontally to view the whole document in code files indented using tabs.

FIX: (#10581) ‘Hide reset button if some of the props are not overridable’ by sprocketc
Check if all props of on a multi-selection are overridable in order to display the reset button.

FIX: (#10461) 'Create GUI dependencies on drop ’ by sprocketc
Allow dropping assets to GUI scenes to create dependencies.

gui-drop

FIX: (#10584) ‘Correctly apply model material overrides in editor scene view’ by matgis
Fixed an issue where model material overrides were not being correctly applied in when viewed in the editor Scene View.

21 Likes

Thank you to the Defold team for this great release.

4 Likes

Thanks to everybody that contributed to the release! The changes look great - especially the editor improvements, I’ll definitely be spending less time in VS Code in the coming weeks to try them out.

There’s an updated Docker image for CI builds: here.

EDIT: updated for the hotfix on 15 May 2025 mentioned below. Tags did not change, you would need to force a pull.

2 Likes

Are the API reference pages down?
https://defold.com/ref/stable/go

I’m on it!

5 Likes

New API reference available soon!

7 Likes

I upgraded to this version but I got a broken sound when playing the audio effect. Everything worked fine on the previous version. This is the effect, the first three times are the sound played by the system by default, and the last three times are the sound played on the latest version.

are all default settings

	timer.delay(2, true, function ()
		sound.play("#sound")
	end)

8bit-shoot45.zip (3.9 KB)

Which platform are you testing on? Any errors in the console? What does the console say when the engine starts? Example:

INFO:SOUND: Sound
INFO:SOUND:   nSamplesPerSec:   48000
INFO:ENGINE: Initialised sound device 'default'

Win10 64bit, Nothing special, as in the previous version

INFO:ENGINE: Engine service started on port 52711
INFO:GRAPHICS: Installed graphics device 'ADAPTER_FAMILY_OPENGL'
INFO:ENGINE: Defold Engine 1.10.1 (2783cc6)
INFO:DLIB: Initialized Remotery (ws://127.0.0.1:17815/rmt)
ERROR:DLIB: Invalid cache index file 'C:\Users\xxx\AppData\Roaming\Defold/http-cache/index'. Removing file.
INFO:ENGINE: Loading data from: build/default
INFO:SOUND: Mix format:
INFO:SOUND:   wFormatTag:       fffe  IEEE_FLOAT/PCM/EXTENSIBLE: 3 / 1 / fffe
INFO:SOUND:   nChannels:        2
INFO:SOUND:   nSamplesPerSec:   48000
INFO:SOUND:   nAvgBytesPerSec:  384000
INFO:SOUND:   nBlockAlign:      8
INFO:SOUND:   wBitsPerSample:   32
INFO:SOUND:   -> Format:        3  IEEE_FLOAT/PCM/EXTENSIBLE: 3 / 1 / fffe
INFO:SOUND:   DSP backend: SSE
INFO:SOUND: Sound
INFO:SOUND:   nSamplesPerSec:   48000
INFO:ENGINE: Initialised sound device 'default'
DEBUG:SCRIPT: Listening for debugger on 0.0.0.0
DEBUG:SCRIPT: Debugger connected from 127.0.0.1
INFO:DLIB: SSDP: Started on address 10.0.0.100
INFO:DLIB: SSDP: Started on address 10.10.17.1
INFO:DLIB: SSDP: Started on address 10.10.44.1
INFO:DLIB: SSDP: Done on address 10.0.0.100
INFO:DLIB: SSDP: Done on address 10.10.17.1
INFO:DLIB: SSDP: Done on address 10.10.44.1

Would it be possible for you to share a repro project?

No problem. It’s basically a default basic project.

test_audio.zip (7.1 KB)

1 Like

Hi, after updating to Defold 10.1, I noticed unexpected behavior when managing game objects (GOs) created via a factory.

  1. I create GOs using a factory.
  2. Their IDs are stored in a separate table.
  3. When a GO is deleted, I iterate through the table to find a matching ID and remove the entry.

In Defold 10.1, the deletion no longer works. When I compare IDs the debug log shows something like this:

DEBUG:SCRIPT: hash: [/instance0]== hash: [/instance0] false

Despite the IDs appearing identical, the comparison returns false.

Has something changed in how instance IDs are compared in Defold 10.1? Do I now need to use a different approach for finding and removing entries from the table?
test_go.zip (3.8 KB)

This sounds like this issue Comparing game object ID hashes returns false, even if they are equal, i.e. printed value is same, and comparing with hash_to_hex returns true · Issue #9374 · defold/defold · GitHub and it’s not related to this particular version.
Let me check you repro project

1 Like

Thanks!
I’ve created this ticket for the issue:
Audio resampling doesn’t work correctly · Issue #10642 · defold/defold

and our two options are

  • Fix it quickly
  • Revert the audio related changes

We’ll let you know either way as we cannot leave it as-is.

4 Likes

So far it seems to only affect the .wav format. The .ogg and .opus formats seems to work well.
While waiting for the fix, a workaround may be to convert to .ogg/.opus if possible. It will likely save you on the final bundle size, so there’s a potential upside to it.

Meanwhile, we’re continuing tracking the issue down.

Edit: We also noticed that it’s an 8-bit sound, so another workaround would be to convert it to 16bit pcm.

6 Likes

Thank you for the report, I can reproduce the issue. I’ll come back to you when I’ll have a solution.

2 Likes

Yes, the purpose of using 8-bit WAV files is to minimize disk size and avoid CPU decoding time for the lowest playback latency. Currently, my alternative solution is converting them to Opus, and I’m satisfied with the disk space usage. However, I’m not sure how much more decoding overhead Opus has compared to WAV. So far, I haven’t noticed any playback delay in my game.

I’ve pushed a fix for the 8-bit .wav issue now.
Expect the CI build to take 15 minutes before it shows up as an update.

As for lowest playback latency, I don’t expect any difference in latency between the codecs.
Regarding playback performance, there may of course be a difference.
However, the key change in this release is that we got SIMD (sse) support on those platforms that support it (intel/amd/wasm), which further decreases the performance gap between uncompressed formats like wav and the compressed formats.
As usual, I say, make measurements yourself to find what fits your needs.

4 Likes