Defold 1.4.4 BETA

Defold 1.4.4

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.

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

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 Releases · defold/defold · GitHub

Set your build server to https://build-stage.defold.com

Release notes

Summary

  • BREAKING CHANGE: (#7431) Refactor textures as resource
  • NEW: (#7457) Show self values in debugger for *.render_script, *.script and *.gui_script
  • NEW: (#7413) Improved gamepad support for the Windows platform
  • NEW: (#6845) Paged texture atlas support
  • NEW: (#7378) Added frustum culling support for model component
  • NEW: (#7415) Added go.exists()
  • FIX: (#7437) Fix bug when some of embeded GOs maybe ignored by component counter
  • FIX: (#7429) Removed duplicate Size property on Gui Text objects
  • FIX: (#7353) Fixed index buffer lookup in headless graphics backend
  • FIX: (#7406) Use locale-insensitive conversion from lower to upper case in bob
  • FIX: (#7400) Show an error message when an added collection file is missing
  • FIX: (#7444) Updated sprite size property documentation
  • FIX: (#7395) Improve error message when Android build is too large
  • FIX: (#7401) URL decode Bob resource path before attempting file operations
  • FIX: (#7446) Bugfix for using basis transcoding since paged atlas feature
  • FIX: (#7430) Produce uv bounds for dynamic atlases
  • FIX: (#7410) Some font glyphs are not rendering correctly
  • FIX: (#7388) Identical names require the same values in templates
  • FIX: (#7419) Set resource name based on filename
  • FIX: (#7435) Add support for external buffers from the .gltf/.glb formats
  • FIX: (#7396) Validate Android package name and iOS bundle identifier
  • FIX: (#7451) Update JavaFX (Fix issue with freezes when using AMD GPUs on Linux system)

Engine

BREAKING CHANGE: (#7431) Refactor textures as resource
As a first step in representing textures as actual handles that can be passed around between the render scripts and the rest of the engine, we need to separate between the actual texture handles and the resources that hold them. A HTexture is currently a pointer to the asset created by the graphics adapter which is then stored in the resource system. Instead, a wrapper around the graphics handle is stored, which means that we can change the way we represent the handle.

Technical note: This is a breaking change in the public dmSDK part of the engine. Several resources now store TextureResource pointers instead of the HTexture objects, and any native extension that use these APIs will have to update their code to make sure the types are correct.

NEW: (#7457) Show self values in debugger for *.render_script, *.script and *.gui_script
Show values from self table in debuggerfor *.render_script, *.script and *.gui_script .

NEW: (#7413) Improved gamepad support for the Windows platform
Added support for various controllers on the Windows platform by implementing a Direct Input layer that can support a wider range of devices natively. This means that you no longer need to use a translation layer between XInput and Direct Input via external tools such as DS4Windows to be able to use gamepads with Defold.

NEW: (#6845) Paged texture atlas support
Added support for generating atlases with multiple pages of texture data. Enable this feature by setting the max page size value in the atlas files to non-zero. To use the paged atlas in the materials, the material shaders require a “sampler2DArray” uniform in order to sample from the texture.

NEW: (#7378) Added frustum culling support for model component

NEW: (#7415) Added go.exists()
Added a go.exists() function to check if a game object exists. Usage:

if go.exists("/my_game_object") then
    print("The game object exists!")
end

FIX: (#7437) Fix bug when some of embeded GOs maybe ignored by component counter
In a case when embedded GOs in a few different collections are the same, component counter didn’t count the second and the following GOs.

FIX: (#7429) Removed duplicate Size property on Gui Text objects
Gui Text nodes no longer show two Size properties.

FIX: (#7353) Fixed index buffer lookup in headless graphics backend
This fixes a buffer overrun issue when using index buffers with the headless graphics backend.

FIX: (#7406) Use locale-insensitive conversion from lower to upper case in bob
This fixes an issue when using the bob command line tool to bundle a Defold project on an operating system with a locale which is does not have a standard lower to upper case mapping, such as Turkish (where a lower case i becomes İ, ie a capital I with a dot).

FIX: (#7400) Show an error message when an added collection file is missing
Show a better error message when a collection file which has been added to a collection does not exist. Previously a NullPointerException error was shown with no reference to the missing file.

FIX: (#7444) Updated sprite size property documentation
The sprite size property was marked as read-only even though it is possible to change the size of a sprite if the size-mode is set to manual.

FIX: (#7395) Improve error message when Android build is too large
It is not possible to create an APK larger than 2Gb using the Android bundletool, but the error message when bundling a very large APK using the command line tools or editor is not very informative. This fix detects the case when the APK is too large and outputs additional information in the error message.

FIX: (#7401) URL decode Bob resource path before attempting file operations
Bob now URL decodes the file:// URL that references the Bob jar file before attempting file operations.

FIX: (#7446) Bugfix for using basis transcoding since paged atlas feature
Fixed an issue with using basis compression together with cubemap generation, where the output of the texture encoding produced an empty result. To fix this issue, we have separated the transcoding into two passes - a preprocessing pass for memory allocation of the result, and one to do the actual transcoding.

FIX: (#7430) Produce uv bounds for dynamic atlases
Added support for using dynamic atlases in GUI.

FIX: (#7452 Updated build toolchain with XCode 14.2, macOS 13.1 and iOS 16.2
We’ve updated our toolchain to support latest XCode plus macOS and iOS sdks.

Editor

FIX: (#7410) Some font glyphs are not rendering correctly
Small glyphs, such as the dot (.) character, are not rendered correctly when the uncompressed size of the glyph is smaller than the compressed size. When this happens the first byte of the glyph is ignored and the glyph is rendered skewed or shifted one pixel in the font texture.

FIX: (#7388) Identical names require the same values in templates
User-facing changes: when multiple templates used in the same GUI define resources with clashing names, we now require them to refer to the same values. For instance, suppose a GUI file named A.gui contains two templates: B.gui and C.gui. If both templates define a font named “main_font” and the actual fonts used in each template are not the same, A.gui will not know which one to use and will randomly choose one. To prevent this issue, we will now display a build error when such clashes occur.

FIX: (#7419) Set resource name based on filename
A common source of problems when working with collection proxies is the fact that all collections are given the name “default”, and if you are not careful and remember to change this name you will run into issues such as The collection ‘default’ could not be created since there is already a socket with the same name.. This change will give a created Collection, Material, or Model resources the same name as the filename.

FIX: (#7435) Add support for external buffers from the .gltf/.glb formats

FIX: (#7396) Validate Android package name and iOS bundle identifier
An Android package name and Apple bundle identifier follows strict rules, but there are no checks in place to verify that the package name and bundle identifiers in game.project actually follow the rules. This fix adds a check when bundling for Android, iOS and macOS that these values follow their respective formats.

Android: Must consist of two or more segments separated by a dot. Each segment must start with a letter. Each segment must only consist of alphanumeric letters or the underscore character.

iOS and macOS: Must consist of two or more segments separated by a dot. Each segment must start with a letter. Each segment must only consist of alphanumeric letters, the underscore or hypen (-) character.

FIX: (#7451) Update JavaFX (Fix issue with freezes when using AMD GPUs on Linux system)
JavaFX updates to the latest at the moment 19.0.2.1 version. It will help with stability and performance, especially on Linux.

17 Likes

I’ve made a new release for Spine here, that is compatible with Defold 1.4.4:

8 Likes

Super hyped to try out the gamepad stuff, well done @jhonny.goransson !

2 Likes

There’s something different in how our Spine anims appear in GUI scenes. We render these by attaching textured GUI nodes to the Spine hierarchy.

Everything else looks fine, including:

  • Rendering using the equivalent method in non-GUI collections
  • Spine rendering in GUI scenes that doesn’t use this technique

Unfortunately I don’t have time to put a repro together as we’re preparing for being away at GDC.

1.4.3 / extension-spine 2.7.1:
image

1.4.4 beta / extension-spine 2.8.0:
image

3 Likes

I think the issue is showing in the 1.4.3 / extension-spine 2.7.1: version as well.
Look at the mouth for instance, it shows some clipping.

However, the issue is worse now in this release.
I’d guess that something with the extrude borders might have changed.
Perhaps @jhonny.goransson has an idea.

1 Like

Please, make a small repo when you have time, without a repo case it’s a bit hard to localize and fix the bug.

Christmas came early this year :partying_face:

6 Likes

Just as a FYI, there’s two issues I’m currently looking into for this beta:

  • the input layer is tanking performance on windows currently due to the gamepad changes
  • something has happened with the atlases (re the spine screenshot posted earlier)

So if you encounter these, know that they will be fixed.

4 Likes

Bug: msg.post("@system:", “reboot”) crashes on mac OS (the only platform I have access to today)

Any callstack or messages in the console?

    Assertion failed: (g_HidContext == 0), function Init, file hid_native.cpp, line 172.
    # 0 pc     0x370414 dmengine _ZN7dmCrashL7HandlerEiP9__siginfoPv+36
    # 1 pc     0x2c8c1d libxpc.dylib _sigtramp+29
    # 2 pc     0x26630f libxpc.dylib __pthread_kill+11
    # 3 pc     0x29df7b libxpc.dylib pthread_kill+263
    # 4 pc     0x1e7ca5 libxpc.dylib abort+123
    # 5 pc     0x1e6fbe libxpc.dylib err+0
    # 6 pc     0x4726c3 dmengine _ZN5dmHID4InitEPNS_7ContextE.cold.4+35
    # 7 pc     0x2fc3d4 dmengine _ZN5dmHID4InitEPNS_7ContextE+580
    # 8 pc      0xfc57f dmengine _ZN8dmEngine4InitEPNS_6EngineEiPPc+4895
    # 9 pc      0xfe6ba dmengine _Z14dmEngineCreateiPPc+170
    #10 pc      0xff24f dmengine _ZN8dmEngine7RunLoopEPKNS_13RunLoopParamsE+95
    #11 pc      0xff1c2 dmengine _Z11engine_mainiPPc+98
2 Likes

Thanks, fixed the issue. Will update here when there’s a new update available!

2 Likes

There should be a new beta available now, please test again if you have the opportunity!

5 Likes

Thanks, both of the bugs I reported above appear fixed.

I found a new issue while trying #7457 (showing self in the debugger) and by the way thank you for this enhancement as it will be very useful.

It can be reproduced in the side scroller tutorial:

  1. Add a simple init function to star.script
function init(self)
	print("init")
end
  1. Choose Debug ->Start/Attach to build with the debugger attached
  2. Set a breakpoint in the init function.

Result: the game freezes and the following is output to the console:

DEBUG:SCRIPT: Debugger: builtins/scripts/edn.lua:200: bad argument #1 to 'pairs' (table expected, got userdata)
DEBUG:SCRIPT: stack traceback:
	builtins/scripts/edn.lua:231: in function <builtins/scripts/edn.lua:230>
	[C]: in function 'pairs'
	builtins/scripts/edn.lua:200: in function 'collect_refs'
	builtins/scripts/edn.lua:188: in function 'collect_refs'
	builtins/scripts/edn.lua:213: in function <builtins/scripts/edn.lua:210>
	[C]: in function 'xpcall'
	builtins/scripts/edn.lua:226: in function <builtins/scripts/edn.lua:223>
	[C]: in function 'pcall'
	builtins/scripts/mobdebug.lua:1045: in function <builtins/scripts/mobdebug.lua:797>
3 Likes

Thx, I’ll take a look

1 Like

I can’t repo it on my machine, could you give me more info:

  • your OS;
  • did you do any other changes in the project? if so, could you share the project with me?

I’ve seen it in Windows and Mac but I just attempted it again and it is a little timing dependent. If it doesn’t crash the first time the breakpoint is triggered, hit F5 and it will probably happen the second time.

2 Likes

Thank you very much for your active testing of this beta.
Debugger issue has fixed and will be available in an hour or so.

4 Likes

Yes is fixed, and thanks for supporting gui scripts now.

6 Likes

I very much agree with this. It is much appreciated! Thanks @AarrrBee !

4 Likes