Defold 1.11.0 has been released

Defold 1.11.0

Important notes

Please pay attention to the scale_along_z-related changes.

Also, this version includes deep refactoring of how the extender collects dependencies and builds Cocoapods. If you have custom extensions that use Cocoapods (have a Podfile in the extension folder), make sure they build well using the stage server, and let us know otherwise.

Summary

  • BREAKING CHANGE: (#9529,#7441,#6165,#5679,#5631) :warning: Removed scale_along_z from the engine (by AGulev)
  • NEW: (#10632) Make aspect ratio–related function in the camera.* module useful (by AGulev)
  • NEW: (#10692) Added physics solver parameters into game.projectBox2D (by AGulev)
  • NEW: (#10795) Enable go.exists() to query the existence of game objects across collections (by AGulev)
  • NEW: (#10781) Add a preference to disable auto-closing parens in the editor. (by vlaaad)
  • NEW: (#8737) Make editor server port more accessible (by vlaaad)
  • NEW: (#10407) Add zip.unpack editor script function (by vlaaad)
  • NEW: (#3157) Show settings from /game.properties and ext.properties (by vlaaad)
  • FIX: (#10404) Fixed an issue where a 16k x 16k atlas couldn’t be unpacked if the file size was bigger than 1 GB (by AGulev)
  • FIX: (#11011) Fixed crash when a material constant was used in a cloned node but the prototype node had been removed (by AGulev)
  • FIX: (#11010) Fix leaks in sys.* module on iOS and macOS (by AGulev)
  • FIX: (#11017) Fix few b2d.body functions that always throw vector3 expected, got userdata. (by AGulev)
  • FIX: (#11009) Fix multipage atlas issue on HTML5 target running on Chrome on Android (by AGulev)
  • FIX: (#11034) An attempt to create an atlas bigger than 16384x16384 throws an error (by AGulev)
  • FIX: (#10840,#8784) Make it possible to work with rotated images in runtime-created atlases (by AGulev)
  • FIX: (#8728) Fix precision issue with multipage atlas (by AGulev)
  • FIX: (#9392,#8540,#10453) Fix PANIC: unprotected error... in some rare cases in Lua (by AGulev)
  • FIX: (#5549) Fixed issue when sys.open_url() reports false when a url is opened on Windows (by AGulev)
  • FIX: (#11060) Fixed an issue where files larger than 2GB couldn’t be read on windows (by AGulev)
  • FIX: (#11066) Added sdk test for macos, ios, linux and android when running check_sdk (by JCash)
  • FIX: (#6577) Fix multi-contour artifacts in DF font generator (by AGulev)
  • FIX: (#11069) Show an error message if the decoder for a used sound isn’t included in the App Manifest (by AGulev)
  • FIX: (#11099) Fix issue with duplicated meshes in models with hierarchies (by jixingcn)
  • FIX: (#9603) Fix issue where some non-skinned GLTF/GLB models were rendered incorrectly (by jixingcn)
  • FIX: (#11020,#11020) Set center panel minimum width (by sprocketc)
  • FIX: (#11067) Fix drag and drop NullPointerException (by sprocketc)
  • FIX: (#11074,#11076) Fix selection context on outline label double click, and no selection npe (by sprocketc)
  • FIX: (#11117) Cancel outline rename on drag (by sprocketc)
  • FIX: (#11112) Use custom markdown/HTML viewer instead of a web view (by vlaaad)
  • FIX: (#11110) Fix template property flattening regression when building (by matgis)

Engine

BREAKING CHANGE: (#9529,#7441,#6165,#5679,#5631) :warning: Removed scale_along_z from the engine’ by AGulev
scale_along_z has been fully removed from the engine. Read the following information to understand how to migrate your projects.

:warning::warning::warning: Action Needed (Breaking Change)

What is scale_along_z?

scale_along_z was a hidden option in *.collection files, set to 0 by default.
When set to 0, scaling on objects and collections did not affect their z-position.

For example, if your sprite has a position x: 0.0, y: 0.0, z: 0.1, and its GameObject has a scale x: 1.0, y: 1.0, z: 2.0:

  • With scale_along_z = 0, the transform of the sprite remains x: 0.0, y: 0.0, z: 0.1
  • With scale_along_z = 1, the transform becomes x: 0.0, y: 0.0, z: 0.2

Why Was It Removed?

This was a legacy feature that introduced special-case logic and added complexity to the engine. While it had utility in some 2D projects, it was often a source of confusion in 3D projects. To unify 2D and 3D workflows, we’ve made the difficult decision to remove it, even though it’s a breaking change.

Who Needs to Take Action?

If you are unfamiliar with scale_along_z, or you never explicitly set it to 1, you need to update your project. If your project consistently used scale_along_z: 1 across all collections, no action is required.

What Should Be Done in Lua Code?

To avoid unexpected behavior now that scaling affects Z-position:

  • Replace all usages of go.set_scale(number|vector3) with go.set_scale_xy(number|vector3)
  • When accessing the scale property via go.get(), go.set(), or go.animate(), use the scale.xy property instead

What Should Be Done in Project Files?

Review your GameObjects and Collections and check for use of the Z component in the scale property.
If you find a non 1.0 Z scale in your project, investigate why it’s there. In most of 2D cases, the Z scale should always be 1.0 because it doesn’t affect anything. However, in some cases—such as pseudo-3D effects, perspective cameras, particles, 3D models, etc. Z-scaling may be intentional. These situations require manual review.

If all children of such an object have position.z == 0, then behavior will not change.
But if position.z is non-zero, then the scale will now affect it, and you’ll need to decide case by case how to proceed based on your game’s requirements.
For example:

  • You might need to adjust object positions to compensate for scale.z now affecting the children’s positions.
  • Or, set the parent object’s scale.z to 1.0 and instead scale all children individually (adjusting positions accordingly).

Automatic migration is not possible due to the variety of use cases.
Please review and adjust your project accordingly.

We apologize for the inconvenience and hope that this change leads to a more consistent and understandable workflow for all users.

NEW: (#10632) ‘Make aspect ratio–related function in the camera.* module useful’ by AGulev
Changes in APIs:
camera.get_aspect_ratio() – Now returns the effective aspect ratio (auto-calculated if auto is enabled, manual value if disabled)
camera.set_aspect_ratio() – Sets the manual aspect ratio value, which is used only if auto is disabled
camera.get_auto_aspect_ratio() – Returns whether auto-calculation is enabled
camera.set_auto_aspect_ratio() – Controls whether to use auto-calculation or the manual value

NEW: (#10692) ‘Added physics solver parameters into game.projectBox2D by AGulev
Added new [box2d] section in game.project:

  • velocity_iterations (default: 10) - Box2D 2.2 velocity solver iterations
  • position_iterations (default: 10) - Box2D 2.2 position solver iterations
  • sub_step_count (default: 4) - Box2D 3.x sub-stepping count

Using these new parameters, users can reduce iterations for better performance or increase for higher precision.

NEW: (#10795) ‘Enable go.exists() to query the existence of game objects across collections’ by AGulev
With this fix, it will be possible to use the go.exists() function to check if a game object exists in another collection.

FIX: (#10404) ‘Fixed an issue where a 16k x 16k atlas couldn’t be unpacked if the file size was bigger than 1 GB’ by AGulev
The 1 GB limitation for compressed files was doubled to make it possible to work with 16k x 16k atlases.

FIX: (#11011) ‘Fixed crash when a material constant was used in a cloned node but the prototype node had been removed’ by AGulev
This fix creates a separate material constant buffer for cloned nodes. This not only fixes the crash when the prototype node is removed, but also makes it possible to use independent values per cloned node.

FIX: (#11010) ‘Fix leaks in sys.* module on iOS and macOS’ by AGulev
Fixed a couple of leaks in the sys.* module, and freed memory allocated for a mount name upon unmount.

FIX: (#11017) ‘Fix few b2d.body functions that always throw vector3 expected, got userdata.’ by AGulev

FIX: (#11009) ‘Fix multipage atlas issue on HTML5 target running on Chrome on Android’ by AGulev
Fixed an issue where multipage atlas can’t be transcoded and used in HTML5 on Chrome on Android. In such cases, the ASTC format will be marked as unsupported, and the next suitable format will be used (ETC2 in most cases).

FIX: (#11034) ‘An attempt to create an atlas bigger than 16384x16384 throws an error’ by AGulev
Most modern GPUs don’t support textures larger than 16384x16384. Defold doesn’t support it either, and this fix simply adds a proper error to notify the user about the issue if they try to create such a texture.

FIX: (#10840,#8784) ‘Make it possible to work with rotated images in runtime-created atlases’ by AGulev
With this fix, resource.get_atlas() returns the rotated flag for geometries, and it’s now necessary to add the rotated flag for geometries in resource.set_atlas().
This resolves issues with rotated images in some GUI cases.

FIX: (#8728) ‘Fix precision issue with multipage atlas’ by AGulev
Fixed an issue where, in a paged atlas, textures were taken from the wrong page. This occurred in rare cases on devices using the WebGL1/OpenGL ES 2.0 graphics backend.

FIX: (#9392,#8540,#10453) ‘Fix PANIC: unprotected error... in some rare cases in Lua’ by AGulev
Fixed PANIC: unprotected error... that occurs in cases like assert(nil, nil) or error(hash("something")).

FIX: (#5549) ‘Fixed issue when sys.open_url() reports false when a url is opened on Windows’ by AGulev

FIX: (#11060) ‘Fixed an issue where files larger than 2GB couldn’t be read on windows’ by AGulev
This PR fixes the issue where having an arcd archive larger than 2 GB on Windows results in a runtime error:

ERROR:RESOURCE: Path to small to fit into buffer: game.arcd
ERROR:RESOURCE: Failed to mount base archive: -1000 for mount archive://game.dmanifest
WARNING:RESOURCE: No resource loaders mounted that could match uri archive:game.dmanifest

FIX: (#11066) ‘Added sdk test for macos, ios, linux and android when running check_sdk’ by JCash
This will help when new contributors setup their environment, to see if their compiler can build and possibly run a test executable.

FIX: (#6577) ‘Fix multi-contour artifacts in DF font generator’ by AGulev
Fixed DF font artifacts that occur in some fonts with vector shapes overlapping each other:

FIX: (#11069) ‘Show an error message if the decoder for a used sound isn’t included in the App Manifest’ by AGulev
Fixes an issue where the engine crashes if an opus file is used without including the OPUS decoder in the App Manifest. Now the engine shows an error to help figure out what’s going on.

FIX: (#11099) ‘Fix issue with duplicated meshes in models with hierarchies’ by jixingcn
Make sure the final mesh set doesn’t contain duplicated meshes.

FIX: (#9603) ‘Fix issue where some non-skinned GLTF/GLB models were rendered incorrectly’ by jixingcn
Fixed an issue where flattening of the GLTF/GLB model didn’t take the model hierarchy into account.

Editor

NEW: (#10781) ‘Add a preference to disable auto-closing parens in the editor.’ by vlaaad
New preference Code → Auto-insert closing parens allows turning off the auto-closing of parens in the editor.

NEW: (#8737) ‘Make editor server port more accessible’ by vlaaad
When the editor opens a project, it will start a web server on a random port. This port is now written to the .internal/editor.port file.

Additionally, we added a command line option --port (or -p) to the editor executable, which allows specifying the port during launch.

Example use:

# on Windows
.\Defold.exe --port 8181

# on Linux:
./Defold --port 8181

# on macOS:
./Defold.app/Contents/MacOS/Defold --port 8181

NEW: (#10407) ‘Add zip.unpack editor script function’ by vlaaad
Now it’s possible to unpack ZIP files using editor scripts, e.g.:

-- simply unpack
zip.unpack("build/dev/archive.zip")
-- unpack to another directory
zip.unpack("build/dev/archive.zip", "build/dev/tmp")
-- overwrite on conflict
zip.unpack("build/dev/archive.zip", {on_conflict = zip.ON_CONFLICT.OVERWRITE})
-- unpack a subset of files
zip.unpack("build/dev/archive.zip", {"config.json", "src"})

NEW: (#3157) ‘Show settings from /game.properties and ext.properties by vlaaad
Now, /game.project form will show settings from /game.properties, as well as from ext.properties files coming from extensions.

FIX: (#11020,#11020) ‘Set center panel minimum width’ by sprocketc
Set a minimum width for the center panel.

FIX: (#11067) ‘Fix drag and drop NullPointerException’ by sprocketc

FIX: (#11074,#11076) ‘Fix selection context on outline label double click, and no selection npe’ by sprocketc

FIX: (#11117) ‘Cancel outline rename on drag’ by sprocketc

FIX: (#11112) ‘Use custom markdown/HTML viewer instead of a web view’ by vlaaad
Improvements:

  • smaller editor size (got 30MB lighter)
  • faster to open markdown/html files
  • now opens relative file links like See [setup.md](setup.md)
  • now scrolls to header links like See [license](#license) section

Regressions:

  • no longer shows SVGs (e.g., shields, contributors’ avatars)
  • not a full-blown HTML viewer anymore (e.g., no div align, no CSS, no JS)

FIX: (#11110) ‘Fix template property flattening regression when building’ by matgis
Fixed a regression when building GUI scenes that would cause certain properties (such as transform-related ones) to not be correctly applied to the imported nodes unless they had layout overrides.

25 Likes

Congratulations on the new release!

NEW: (#10795) ‘Enable go.exists() to query the existence of game objects across collections’ by AGulev

Sounds almost like a tailormade fix for something I struggled with while building my testing library a few months ago, so I will definitely go give it a try! :star_struck:


There’s updated Docker images for CI builds: here.

5 Likes

Thank you for all your diligent work! Another fantastic release! Thank you all so much for go.exists() and zip.unpack. I was working on a couple of problems that just got solved in one fell swoop thanks to these gems! Solid release, thanks again!

3 Likes

In this version, I experienced an issue that had me a little confused. I added a couple songs to my project. They are attached to a game object in a collection and used the whole game, so they live in memory for the game’s life cycle.

After adding the sounds, I tried rumning the game and it would not give me an error on failure. The game screen goes black screen and closes. The sound log dump never produced either.

I changed sound file count and it worked again.

@vlaaad do you remember what types are supported for ext.properties? I couldn’t find it anywhere.

also is it safe to set empty/null like this?

folder.type = string
folder.default = 

files.type = string
files.default = 

We should add documentation for this. In the meantime here’s the source code:

1 Like

We already did: Defold project settings

1 Like

Ah, thank you! I searched the source but didn’t think it would be in the bob.

we finally figured out what was still causing us scale.xyissues. factory.create takes a scale parameter but doesn’t come up when you grep for scale :slight_smile: finally unblocked our 1.11.* migration.

4 Likes