Defold 1.9.0 BETA

Defold 1.9.0 BETA

The latest beta is now released, and we invite those interested in beta testing the new features in the editor and engine to join now.
The beta period will be 2 weeks and the next planned stable release is two weeks from now.

We hope this new workflow will highlight any issues earlier, and also get valuable feedback from our users. And please comment if you come up with ideas on improving on this new workflow.

Please report any engine issues in this thread or in issues using Help → Report Issue

Thx for helping out!

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 http://d.defold.com/beta/

Summary

  • BREAKING CHANGE: (#7889) Added initial C support to configfile.h, extension.h and resource.h
  • NEW: (#8935) Frustrum culling for tilemap
  • NEW: (#8912) Vulkan readpixels support
  • NEW: (#29) Spine Clipping Feature Support
  • NEW: (#8667) dmSDK: Added possibility to load collection proxies and spawn factories from C++
  • NEW: (#8932) Make the ASCII character set optional in fonts
  • NEW: (#8348) Migrate OSX to GLFW3+
  • NEW: (#9021) Add option to build script that generates compile_commands.json file(s)
  • NEW: (#9047) Change sprite image by sampler hash
  • NEW: (#9049) Updated to Xcode 15.4, iOS SDK 17.5 and macOS SDK 14.5
  • NEW: (#9060) Concat errors when creating shaders in runtime
  • NEW: (#8975) Compute shader support part 3
  • NEW: (#8983) Fixed the order of layers in the dropdown menu
  • NEW: (#8973) Added ability to rotate and flip the brush when painting in tilemap.
  • NEW: (#8914) Bundle lua language server into the editor
  • NEW: (#8986) Allow adding multiple components at once
  • NEW: (#9031) Add child-seqs to outline nodes for copy+paste handling
  • NEW: (#9059) Allow disabling globals linting
  • NEW: (#9055) Add imperative editor script API
  • FIX: (#376) Unescape gcc defines before use
  • FIX: (#380) Improved Info.plist merge handling
  • FIX: (#8871) Support tangent space handedness
  • FIX: (#8987) Fixed the issue where the Tilemap was not using flip and rotate attributes for physics
  • FIX: (#8945) Use resource pointers all the way for GUI textures
  • FIX: (#8972) Fix crash in GUI when atlas changes texture resource internally
  • FIX: (#8918) Fixed triggers and back button for controllers on macOS
  • FIX: (#26) AdQuality SDK
  • FIX: (#382) Include shared objects from an .aar file into Android builds
  • FIX: (#8956) Added Android bundler option to extract native libs on install
  • FIX: (#8994) Fixed APK installation on device after bundling.
  • FIX: (#9015) Update Android SDK to version 34.0.0 and targetSdkVersion to 34
  • FIX: (#9028) Fix issues with physics.set_shape() for Sphere shape
  • FIX: (#9029) Fix issue whenPrivacyInfo.xcprivacy end up in wrong directory in macOS bundle
  • FIX: (#9002) Multi-touch improvements for Android devices
  • FIX: (#9062) Delete dynamic attributes from sprites when deleting the instance
  • FIX: (#8951) Make sure user uses only one shape type in a Collision Object
  • FIX: (#9026) Ensure build targets from embedded objects inside editable resources fuse with equivalents from non-editable resources
  • FIX: (#8980) Added the ability to select a tile region in the palette map as a brush
  • FIX: (#8984) Fixed the issue where “Frame Selection” (F) doesn’t work on multipage atlas.
  • FIX: (#8934) Bring back update download progress
  • FIX: (#8963) Sanitize project folder name in the Welcome dialog.
  • FIX: (#8958) Improve suggested completions
  • FIX: (#8959) Don’t suggest completion popup unnecessarily
  • FIX: (#9022) Refactor editor scripts runtime
  • FIX: (#9042) Make sure that recursion is impossible when pasting a folder into its subfolders.
  • FIX: (#9030) Show an error if the wrong script type is used

Engine

BREAKING CHANGE: (#7889) Added initial C support to configfile.h, extension.h and resource.h
We’ve added some first pure C api headers to our dmSDK: configfile.h, extension.h and resource.h.
This is a step in our current effort to add C# support to our engine.

:warning:
The old C++ api’s should be mostly intact, however we did change passing some structs as pointers (previously passed as references).

Also, due to limitations of typedef’ing enums, we generate some C++ enums from the C equivalents. Casting between them is safe.

While stricly a breaking change for extension developers, we don’t anticipate many developers having to do any changes to their extensions.

New extension releases:

We have updated some extensions that use the new api’s:

Migration:

For a full list of migration notes, see the PR

dmsdk/dlib/configfile.h

This file now contains both the the C and C++ api.

dmsdk/extension/extension.h

This file now contains both the the C and C++ api.

  • May need to cast from C++ enum to C enum
  • May need to cast to correct callback type

dmsdk/resource/resource.h

This file now contains both the the C and C++ api.

  • We’ve updated the resource system to use pointers to structs in the public callbacks.
  • We’ve moved some structs into opaque handles

NEW: (#8935) Frustrum culling for tilemap
Tilemaps are now included when doing frustum culling in render.draw(). Tilemaps are divided into 32x32 tile regions and culling is applied per region, not individual tiles.

NEW: (#8912) Vulkan readpixels support
The vulkan render adapter can now read the framebuffer into a pixel buffer. This is currently only used in recorder extension(s), but the functionality might be available in a user facing api at some point.

NEW: (#29) Spine Clipping Feature Support
Add support for clipping in spine extension.

NEW: (#8667) dmSDK: Added possibility to load collection proxies and spawn factories from C++
This update adds more functionality to our C++ sdk, which is part of our effort to allow a developer to write the game logic using C++.
It is an ongoing task, and we’ll add more functionality along the way.

NEW: (#8932) Make the ASCII character set optional in fonts
The Extra Characters field has been deprecated and replaced with a new field called Characters. This new field combines the default ASCII with any previously defined Extra Characters. Using this new field, developers can specify exactly which symbols the font should include, e.g. numbers only, etc.

NEW: (#8348) Migrate OSX to GLFW3+
We have removed our old modified GLFW version on OSX in favour of the latest publicly released GLFW 3.4 version. This will enable us to improve our desktop feature set, as well as help fix many legacy OS issues across the board. When we consider that this work is stable enough on OSX, the rest of the desktop platforms will get updated as well.

NEW: (#9021) Add option to build script that generates compile_commands.json file(s)
Adds a new --generate-compile-commands option to build.py that generates compile_commands.json files per engine lib/sub project and concatenates them into one “global” json that is written to the root.

Before (using ECC, but without compile_commands.json):


After:


NEW: (#9047) Change sprite image by sampler hash
Scripts can now change a sprite image by using a sampler hash:
go.set("#sprite", "image", self.my_atlas_mask, { key = sampler_name })

Or get the atlas from a specific sampler:
go.get("#sprite", "image", { key = sampler_name })

For example, this sprite is using a material that has two samplers, tex0 and tex1:

To change the second atlas, pass “tex1” in as the key in the go.set call:
go.set("/go1#sprite", "image", my_tex1_atlas, { key = "tex1" })

To retrieve the atlas of the sampler, call:
local my_tex1_atlas = go.get("/go1#sprite", "image", { key = "tex1" })

NEW: (#9049) Updated to Xcode 15.4, iOS SDK 17.5 and macOS SDK 14.5

NEW: (#9060) Concat errors when creating shaders in runtime
Shader errors now include the name of the shader and a concatenated error string when the graphics driver is unable to create it.

NEW: (#8975) Compute shader support part 3
We have released a technical preview of the next iteration of the compute shader support in Defold. Compute shaders are a general purpose shader program that can be used for any type of game related tasks on the GPU. Although you can use it for rendering as well, compute shaders are typically used for things like updating rigged animation, particle systems, ray marching and so on.

A compute program is similar to a Material - you can specify constants and samplers in the resource itself, as well as use certain render api functions to bind textures and constants. However, there is no logical connection to a game object, everything related to a compute program happens in a render script and there is no editor preview.

Please note!
since we consider this to be a a technical preview, things might change between versions in case we need to make significant changes to the source formats and engine functionality. Please help us improve this feature by testing it out and report any bugs you might encounter!

FIX: (#376) Unescape gcc defines before use
The GCC_PREPROCESSOR_DEFINITIONS of a Podspec may contain escaped strings. These need to be unescaped before use. Example:

FIX: (#380) Improved Info.plist merge handling
This change improves how <array> entries are merged. An array key can now specify a keep merge strategy, to keep existing values as-is and add new values to the array. If the array has the merge merge strategy (the default), any values in the array will be merged (more specifically <dict> values).

Example with the default merge strategy:

A:
<key>My Array</key>
<array>
	<dict>
		<key>Foobar</key>
		<array>
			<string>a</string>
		</array>
	</dict>
</array>

B:
<key>My Array</key>
<array>
	<dict>
		<key>Foobar</key>
		<array>
			<string>b</string>
		</array>
	</dict>
</array>

MERGED:
<key>My Array</key>
<array>
	<dict>
		<key>Foobar</key>
		<array>
			<string>a</string>
			<string>b</string>
		</array>
	</dict>
</array>

Same example with the keep merge strategy:

A:
<key merge='keep'>My Array</key>
<array>
	<dict>
		<key>Foobar</key>
		<array>
			<string>a</string>
		</array>
	</dict>
</array>

B:
<key>My Array</key>
<array>
	<dict>
		<key>Foobar</key>
		<array>
			<string>b</string>
		</array>
	</dict>
</array>

MERGED:
<key>My Array</key>
<array>
	<dict>
		<key>Foobar</key>
		<array>
			<string>a</string>
		</array>
	</dict>
	<dict>
		<key>Foobar</key>
		<array>
			<string>b</string>
		</array>
	</dict>
</array>

FIX: (#8871) Support tangent space handedness
Tangents are now produced as vec4 in the engine, where the fourth component is the handedness of the tangent vector. This can then be used to calculate the correct tangent space vectors in a shader:

vec3 bitangent = cross(normal, tangent.xyz * tangent.w);

FIX: (#8987) Fixed the issue where the Tilemap was not using flip and rotate attributes for physics
Fixed the issue where tile rotation and flip were applied for the visualization of the tile but not for physics.

FIX: (#8945) Use resource pointers all the way for GUI textures

FIX: (#8972) Fix crash in GUI when atlas changes texture resource internally
Fixed a crash where a call to resource.set_atlas(…) replaces the texture that was backing an atlas used in a GUI with a new texture resource. In this case, the engine was using the old texture resource pointer that was originally used in the atlas, whereas now we resolve the actual pointer being used instead.

FIX: (#8918) Fixed triggers and back button for controllers on macOS
Fixed an issue when triggers and back button on macOS weren’t caught by the gamepads input system.

FIX: (#26) AdQuality SDK
The extension now supports the IronSource Ad Quality SDK which can be used to review the ads that are served to your users and report problematic content, ad network quality issues and measure how your ads perform.

The Ad Quality SDK will be initialized together with the IronSource SDK when calling ironsource.init().

Fixes #20

FIX: (#382) Include shared objects from an .aar file into Android builds
Some .aar fils contain a jni folder with .so files. This task should make sure to find these files and send them back to the client for bundling.

FIX: (#8956) Added Android bundler option to extract native libs on install
The Android bundler will now respect the android:extractNativeLibs attribute on the application level in AndroidManifest.xml. The option is configurable from game.project in the Android section.

This attribute indicates whether the package installer extracts native libraries from the APK to the file system. If set to “false”, your native libraries are stored uncompressed in the APK. Although your APK might be larger, your application loads faster because the libraries load directly from the APK at runtime.

IMPORTANT

If you are using a custom AndroidManifest.xml and would like to use this new option please make sure to add the android:extractNativeLibs attribute to the <application> tag:

<application
        android:extractNativeLibs="{{android.extract_native_libs}}"

FIX: (#8994) Fixed APK installation on device after bundling.
Make sure that the correct APK path is used when the editor installs the APK on a device.

FIX: (#9015) Update Android SDK to version 34.0.0 and targetSdkVersion to 34

FIX: (#9028) Fix issues with physics.set_shape() for Sphere shape
Fixed the issue where physics.set_shape() doesn’t apply physics world scale when Allow Dynamic Transformis checked in game.project.

FIX: (#9029) Fix issue whenPrivacyInfo.xcprivacy end up in wrong directory in macOS bundle
In the macOS bundle, PrivacyInfo.xcprivacy should be in the Resources folder instead of the root *.app directory.

FIX: (#9002) Multi-touch improvements for Android devices
Fixed an issue where multi-touch on Android caused some events to not be processed, leading to “ghost” input events that gets dispatched to the on_input function forever.

FIX: (#9062) Delete dynamic attributes from sprites when deleting the instance
Fixed an issue where dynamically allocated vertex attributes were not correctly released from sprite components when the sprite component has been deleted.

Editor

NEW: (#8983) Fixed the order of layers in the dropdown menu
Make the order of layers in the dropdown menu the same as specified in the outline panel.

NEW: (#8973) Added ability to rotate and flip the brush when painting in tilemap.
Now it’s possible to flip and to rotate the brush when editing tile map using the following hotkeys:

  • X - flip the brush horizontally
  • Y - flip the brush vertically
  • Z - rotate the brush 90° clockwise

NEW: (#8914) Bundle lua language server into the editor
This changeset includes the Lua language server into the editor distribution, so it’s enabled in all projects. Yay!

NEW: (#8986) Allow adding multiple components at once
Now it’s possible to add multiple components to a GameObject at once.

NEW: (#9031) Add child-seqs to outline nodes for copy+paste handling
The editor now has support for copy/paste/cut of all resources nodes in the outline view except for “layouts”. Layouts are unique and only one of each type can exist in a GUI at any time.

NEW: (#9059) Allow disabling globals linting
It’s now possible to set or disable globals linting in .luacheckrc, e.g.:

globals = false -- disable all globals warnings

NEW: (#9055) Add imperative editor script API
This changeset adds imperative editor script APIs:

  1. editor.transact(txs): similar to "set" action — modify the editor’s in-memory state.
  2. editor.execute(cmd...): similar to "shell" action — execute a shell script.
  3. editor.save(): persist all unsaved changes to disk.

FIX: (#8951) Make sure user uses only one shape type in a Collision Object
Show an error if the user uses both a Collision Shape based on a tilemap and a primitive shape in the same Collision Object.

FIX: (#9026) Ensure build targets from embedded objects inside editable resources fuse with equivalents from non-editable resources
Fixed exception when building a project that contains equivalent embedded objects in both an editable and a non-editable resource.

FIX: (#8980) Added the ability to select a tile region in the palette map as a brush
Now it is possible to select a few tiles in the palette as a brush.

FIX: (#8984) Fixed the issue where “Frame Selection” (F) doesn’t work on multipage atlas.
Fixed the issue where “Frame Selection” (F) doesn’t work on a multipage atlas if an image is selected on any page except the first one.

FIX: (#8934) Bring back update download progress
Now the update download progress is back

FIX: (#8963) Sanitize project folder name in the Welcome dialog.
Sanitize the project folder path to remove all prohibited symbols used in the project title when creating a new project in the Welcome screen.

FIX: (#8958) Improve suggested completions
This changeset does not show “lower quality” completions (text) when the “higher quality” completions are present (e.g. method, variable, etc.).

FIX: (#8959) Don’t suggest completion popup unnecessarily
The editor no longer shows the completion popup after typing { and ,.

FIX: (#9022) Refactor editor scripts runtime
We want to expand the editor scripting capabilities in the future, so we refactored the editor script Lua runtime to be more efficient when it comes to runtime-editor interactions, and to be more user-friendly. One noticeable change in editor script behavior is automatic reload of resources after file:write(...); file:close() calls while the editor script is running. This means that using editor.get(my_resource_path, "text") after writing to a file identified by my_resource_path will now return the updated text.

FIX: (#9042) Make sure that recursion is impossible when pasting a folder into its subfolders.
Show an error if the user tries to paste a folder into its subfolders.

FIX: (#9030) Show an error if the wrong script type is used
Fixed the issue where neither the editor nor bob reacts when the wrong script type is used, such as a .script file instead of a *.gui_script in *.gui etc.

21 Likes

This is going to be yet another great release! :heart:

And thank you so much for the extensive Release Notes!

:partying_face:

and:

Yes! Finally! Tilemap editor getting updates is amazing! :paintbrush:

10 Likes

What a great news! Group selection for tileset is game changer for me. Without this adding building or big tree was sooooo frustrating. Thank you for adding this! Also frustrum culling sounds great, I will check this right away!

Edit: It seems to really make a change! May map is only 192x192 with 4 layers and just by replacing 1.7.0 to 1.9.0 beta avg FPS went from 1020 to 1150! Can’t wait to try it on larger maps :smiley:

Edit2: Guys, its wild! 512x512 and still +1000 fps (up to 1200 when I stay in place where only 1 layer is used). In comparison, in Defold 1.7.0 FPS has dropped to ~500.

10 Likes

Um, my keyboard keys no longer work. :astonished:
Well, just the space bar. But arrow or whatever else I was using no longer works…

1 Like

I notice Liniting is automatic now, which really slows down my build. I do not see an option to disable it in the editor. Is disabling it supported?

Also, my game now takes a longer time to transition between tilemap building scenes. If need be, I can provide videos. I am really looking forward to the tilemap culling. :frowning:

2 Likes

Tilemap getting updates is awesome! Thanks!

3 Likes

What OS are you on?

Windows 10 Pro
Intel Core i5-3470 CPU @ 3.20 GHz
8 GB RAM
64-Bit OS

1 Like

Not sure what you did but opening the editor and projects is even faster than before. Thank you!

5 Likes

I’ve pushed a fix for the inputs to beta just now. It will be available in 40 minutes or so when this action completes: Fix crash on android when events are issued that are not supported (#… · defold/defold@755eddd · GitHub

3 Likes

please open an issue for that and provide as much info as possible

On a Macbook with a 60Hz display, both our game and defold-metrics now appear to be running at 120fps even with vsync enabled.
It could be related to this GLFW issue.

I have done so. Thank you very much for helping.

Defold 1.9.0 (9f9927c98a4fd29b7d04555b009d8d3322577166)
when called “model.set_mesh_enabled” in cases:

  1. when added game object (A) → component model not found
  2. when added game object file → CRASH

TestModel_MeshEnabled.zip (137.8 KB)

in Defold 1.8.1 this is all OK

Seems I cannot do the Android build (1.8.1 works).

log.txt

com.samskivert.mustache.MustacheException$Context: No method or field with name ‘env’ on line 1
at com.samskivert.mustache.Template.checkForMissing(Template.java:344)
at com.samskivert.mustache.Template.getValue(Template.java:247)
at com.samskivert.mustache.Template.getCompoundValue(Template.java:260)
at com.samskivert.mustache.Template.getValue(Template.java:244)
at com.samskivert.mustache.Template.getValueOrDefault(Template.java:292)
at com.samskivert.mustache.Mustache$VariableSegment.execute(Mustache.java:872)
at com.samskivert.mustache.Template.executeSegs(Template.java:170)
at com.samskivert.mustache.Template.execute(Template.java:137)
at com.samskivert.mustache.Template.execute(Template.java:128)
at com.defold.extender.TemplateExecutor.execute(TemplateExecutor.java:19)
at com.defold.extender.Extender.(Extender.java:266)
at com.defold.extender.Extender.(Extender.java:295)
at com.defold.extender.AsyncBuilder.asyncBuildEngine(AsyncBuilder.java:100)
at com.defold.extender.AsyncBuilder$$FastClassBySpringCGLIB$$3a887347.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)

1 Like

It seems like you use wrong extender (build server), please change it in properties to
https://build-stage.defold.com

Oh! Yes that does it. :+1:

This is great and works perfectly. I almost gave up on using Tiled (but not yet).
The built-in tilemap editor is getting better, thank you.

However, there is a problem: if we can flip the tile in the Editor, then we need to be able to get this with get_tile()or something like get_tile_flip(). Maybe something similar to Tiled flipes.
In my case, I’m replacing decorative tiles with animated sprites (the tiles are just placeholders), and I need to know if they are flipped or not, so I can flip the sprite in the same way.

5 Likes

Please add a feature request on github!

2 Likes