Defold 1.11.0 BETA

Defold 1.11.0 BETA

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.

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.11.0 - beta · defold/defold · GitHub

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.

19 Likes

We’ve added the following editor fix to the beta release. It will be available on the beta channel shortly.

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.

5 Likes

I’m all in.

Kind reminder: 1.11.0 still in Beta.
Please test the beta in your projects :teddy_bear:

2 Likes

Am I reading this correctly? So if you never used scale_along_z you need to take action? But if you do use it, you don’t have action *if* you set it to 1. If you set it to other numbers you need to fix it?

2 Likes

Yes, you read that correctly.
It’s one of the reasons we’ve been talking about removing it for years and didn’t take action, but it’s the cause of many issues, and we need to finally fix it.

If you use scale_along_z, your game already works as all games will starting from 1.11.0.
That’s why no action is needed in this case.

3 Likes

Found one issue: Spine not showing in the GUI when using layout in the editor · Issue #11162 · defold/defold · GitHub

2 Likes
INFO:DLIB: Log server started on port 43489
INFO:ENGINE: Target listening with name: blue - fe80::bf0b:5ef7:3480:2799 - Linux
INFO:ENGINE: Engine service started on port 36743
INFO:GRAPHICS: Installed graphics device 'ADAPTER_FAMILY_OPENGL'
INFO:ENGINE: Defold Engine 1.11.0 (7e18fe7)
INFO:PROFILER: Initialized Remotery (ws://127.0.0.1:17815/rmt)
INFO:ENGINE: Loading data from: build/default
INFO:SOUND:   DSP backend: SSE
INFO:SOUND: Sound
INFO:SOUND:   nSamplesPerSec:   48000
INFO:ENGINE: Initialised sound device 'default'
ERROR:SCRIPT: event/event.lua:25: attempt to index global 'event_context_manager' (a nil value)
stack traceback:
  event/event.lua:25: in main chunk
  [C]:-1: in function require
  main/core/config.lua:1: in main chunk
  [C]:-1: in function require
  main/render/custom_rendy.render_script:35: in main chunk

I get this with the beta. No issues with Defold Engine 1.10.4 (1aafd0a).

Did you build with https://build-stage.defold.com server?

1 Like

I did not, I forgot that was a thing. Now with that it builds as it should. :+1:

Would be nice to have a reminder about that near the beta download link in the future.

3 Likes

The beta editor already defaults to the beta server. But if you’ve set the server to something specific, it will use that.

Would the beta editor indicate that with the input field placeholder text? It showed as https://build.defold.com (placeholder text, not inputted) for me in the beta editor and I have never set it to anything. I also think this is the second time I have wondered why the beta editor doesn’t default to the beta server.

It should, but if doesn’t then that’s a bug. Please open a ticket on GitHub!

1 Like

A fix has been merged, and should reach the beta channel shortly. Thanks for reporting! :heart:

2 Likes