⇠ More posts

Defold release 1.4.6

By Björn Ritzl on May 22, 2023

Tagged as: Release notes


Defold 1.4.6

Summary

  • NEW: (#7521) Generate a build report for live update content
  • NEW: (#7238) Set texture float support
  • NEW: (#7559) Refactor textures as handles
  • NEW: (#7578) Resource get texture info
  • NEW: (#7585) New paramenter --max-cpu-threads for bob.jar
  • NEW: (#7583) Support texture handles in render.enable_texture
  • NEW: (#7591) Added back gesture support for Android 13
  • NEW: (#7566) Show project template URLs on editor Welcome screen
  • NEW: (#7614) Fix focus on committing values in the form view
  • FIX: (#7477) Added option to make DefoldActivity transparent on Android
  • FIX: (#7510) Crash when using a tilesource with 50 tiles
  • FIX: (#7603) Fix issue when setting up persistent file storage on HTML5 from a sandboxed iframe
  • FIX: (#7607) Cubemap faces are flipped when bundling
  • FIX: (#7373) Updated MoltenVK to v1.2.3 db8512a6
  • FIX: (#7635) Fixed issue with finding the skin in an animated model
  • FIX: (#7594) Added support for throwing a Java exception from the model compiler
  • FIX: (#7612) Fixed struct size calculation for buffer formats
  • FIX: (#7562) Clickable Lua preprocessor build errors
  • FIX: (#7570) Correct animation preview speed on high refresh rate screens
  • FIX: (#7551) Show output from the bundle process while bundling from the editor
  • FIX: (#7633) Fixed modelc exception handling for Win32
  • FIX: (#7635) Fixed issue with finding the skin in an animated model
  • FIX: (#7576) Camera frustum preview

Engine

NEW: (#7521) Generate a build report for live update content The generated build reports will now also list excluded live update content in a separate report file.

java -jar bob.jar --verbose --platform=x86_64-macos --archive --liveupdate=yes --build-report=report.json --build-report-html=report.html clean build bundle

Will generate:

excluded_report.html
excluded_report.json
report.html
report.json
report_time.json

NEW: (#7238) Set texture float support Exposed floating point texture formats to the resource script API:

resource.TEXTURE_FORMAT_RGB16F
resource.TEXTURE_FORMAT_RGB32F
resource.TEXTURE_FORMAT_RGBA16F
resource.TEXTURE_FORMAT_RGBA32F
resource.TEXTURE_FORMAT_R16F
resource.TEXTURE_FORMAT_RG16F
resource.TEXTURE_FORMAT_R32F
resource.TEXTURE_FORMAT_RG32F

Note that the device running your game might not support all of these features, and the constants will only be exposed if it does. To check if the device can support a certain format, you can check if it is nil:

if resource.TEXTURE_FORMAT_RGBA16F ~= nil then
    -- it is safe to use this format
end

NEW: (#7559) Refactor textures as handles Refactored how textures and rendertargets are exposed and used in the engine, instead of passing around raw pointers, we now represent them as generic asset handles. This is the first step to bring the render and gameobject world closer together, where graphical assets can be transparently shared between them. Meaning, a texture that has been created by a script (or any texture, e.g an atlas texture) can be passed to the render scripts where it could be bound to the render state for drawing. Similarly, a render target could be created in a render script, passed to a game object and used as a texture on a model or an atlas.

NEW: (#7578) Resource get texture info Added the new function resource.get_texture_info to get metadata from a texture resource or handle:

local my_texture_info = resource.get_texture_info(my_texture_path)

-- my_texture_info is a table that contains
{
     handle, -- the numeric handle of the texture
     width, -- width of the texture
     height, -- height of the texture
     depth, -- depth of the texture (1 for a 2D texture, 6 for a cube map and [1...slice-count] for an array texture)
     mipmaps, -- number of mipmaps the texture has
     type -- texture type
}

NEW: (#7585) New paramenter --max-cpu-threads for bob.jar Added new parameter --max-cpu-threads for bob.jar which controls the maximum number of threads bob.jar can use. At the moment this value used only by the texture encoder. Also, if texture compression is ON in the editor, the editor uses at least detected_max_threads - 1 in case when 2–4 threads are available and detected_max_threads - 2 if more than 4 cores are available.

NEW: (#7583) Support texture handles in render.enable_texture Render scripts now support enabling texture handles via the render.enable_texture function. This means that you can pass a texture handle from scripts to the renderer and use them as global textures when rendering:

-- in a regular gameobject script:
local my_texture_info = resource.get_texture_info("/my_atlas.a.texturesetc")
msg.post("@render:", "set_my_texture", { handle = my_texture_info.handle })

-- in a render script:
function update(self, dt)
    render.enable_texture(0, self.my_texture)
end

function on_message(self, message_id, message)
    if message_id == hash("set_my_texture") then
        self.my_texture = message.handle
    end
end

NEW: (#7591) Added back gesture support for Android 13 Android 13 doesn’t support Back button anymore. Instead, it uses back gesture. This

⚠️ AndroidManifes.xml updated with new flag android:enableOnBackInvokedCallback="true" for the <application> tag. If you use your own manifest, make sure you apply the same changes.

FIX: (#7477) Added option to make DefoldActivity transparent on Android It is now possible to make the main Activity transparency by adding a meta-data option in AndroidManifest.xml:

    <meta-data android:name="alpha.transparency" android:value="true" />

Note: By default the feature is disabled and does not negatively impact performance.

FIX: (#7510) Crash when using a tilesource with 50 tiles The “max mipmaps” value was not correctly set in res_texture, so the assert was triggered even though it should have been supported.

FIX: (#7603) Fix issue when setting up persistent file storage on HTML5 from a sandboxed iframe Setting up persistent file storage while running an HTML5 build from a sandboxed iframe on Firefox would throw an exception and stop the game from loading. This change will catch any exceptions thrown while setting up persistent file storage and continue to load the game.

FIX: (#7607) Cubemap faces are flipped when bundling Fixed a bug where the cubemap +z and -z sides are uploaded incorrectly on OpenGL based graphics adapters.

FIX: (#7373) Updated MoltenVK to v1.2.3 db8512a6 We’ve updated the MoltenVK library to version 1.2.3

FIX: (#7635) Fixed issue with finding the skin in an animated model This fixes a crash when the skin didn’t have a name.

FIX: (#7594) Added support for throwing a Java exception from the model compiler We’ve made the model compiler more robust and it will now catch any C/C++ errors, and then throw a Java error. This lets the editor handle such a case, and we minimise the risk of the user losing any edits in the project.

FIX: (#7612) Fixed struct size calculation for buffer formats The allocated buffers used too much memory due to a miscalculation in the struct size.

Editor

NEW: (#7566) Show project template URLs on editor Welcome screen The project templates that are used on the editor Welcome screen are downloaded from GitHub when used. This change shows the URL of each template project in the list. The URL is clickable and will download the template project if selected. This will help users understand that the templates are not stored locally with the editor but downloaded from the internet, and thus require an internet connection to use.

NEW: (#7614) Fix focus on committing values in the form view

FIX: (#7562) Clickable Lua preprocessor build errors

  • Build errors from extension-lua-preprocessor now show more information and are clickable in the Build Errors view.

FIX: (#7570) Correct animation preview speed on high refresh rate screens The update speed for flipbook animations and particle effects were locked to 60 updates per second even if previewing on a high refresh rate screen (eg 144Hz).

FIX: (#7551) Show output from the bundle process while bundling from the editor This fixes an issue in Defold 1.4.4 where output from the command line tool was not shown in the editor while bundling.

FIX: (#7633) Fixed modelc exception handling for Win32 We fixed a use-after-free issue that was noticed on Windows platforms.

FIX: (#7635) Fixed issue with finding the skin in an animated model This fixes a crash when the skin didn’t have a name.

FIX: (#7576) Camera frustum preview Added a wireframe rendering of the camera frustum for the editor.