Defold 1.9.7 has been released

Defold 1.9.7

Summary

  • NEW: (#10081) Update Android SDK to version 35.0.1 and targetSdkVersion to 35 (by AGulev)
  • NEW: (#10033) Update XCode to 16.2, MacOS SDK to 15.2, iOS SDK to 18.2 (by AGulev)
  • NEW: (#9889) Add gamepad mapping for Core (Plus) Wired Controller (by j-h-a)
  • NEW: (#9910) New options for LiveUpdate: specifying a zip archive filename and placing the archive into the bundle folder. (by AGulev)
  • NEW: (#9680) Support using structs in uniforms (by Jhonnyg)
  • NEW: (#9964) Added response.url to http requests and progress callbacks (by JCash)
  • NEW: (#9950) Append raw texture data after protobuf header (by Jhonnyg)
  • NEW: (#9979) Add astcenc for Linux ARM64 (by aglitchman)
  • NEW: (#10009) Cache only big files such as textures and fonts (by AGulev)
  • NEW: (#10018) Ensure that Bob stops building immediately if any of the build steps fail (by AGulev)
  • NEW: (#9854) Added the ability to specify custom templates for the project. (by AGulev)
  • NEW: (#10027) Automatically open the “Select Resource” window when adding a new GUI template node (by AGulev)
  • NEW: (#10028) Removed Git synchronization functionality from the editor (by AGulev)
  • NEW: (#10022) Use new texture compression setup in texture profiles view (by Jhonnyg)
  • FIX: (#9899) Check if there’s a dynamic texture with the same id before creating it (by britzl)
  • FIX: (#9909) Cleanup unused functions from the DMSDK vulkan API (by Jhonnyg)
  • FIX: (#9951) Add initial dmsdk for WebGPU (by Jhonnyg)
  • FIX: (#9939) GLFW3 support for linux (by Jhonnyg)
  • FIX: (#9965) Handle cube texture types properly (by smagnuso)
  • FIX: (#10047) Fix issue when Liveupdate excluded report is empty (by AGulev)
  • FIX: (#9969) Added resource.create_sound_data() and writable “sound” property to sound component (by JCash)
  • FIX: (#9962) Initialized liveupdate Lua module first, allowing using http/file providers without a bundle (by JCash)
  • FIX: (#9922) Improved reverse hash implementation performance (by JCash)
  • FIX: (#10000) Remove argument to --tc (by Jhonnyg)
  • FIX: (#10008) Added wasapi support for 2+ channel output devices (by JCash)
  • FIX: (#10013) Fix windows app icon (by Jhonnyg)
  • FIX: (#10017) Fix and add gamepad mappings for “Core (Plus) Wired Controller” and “HORIPAD S” (by j-h-a)
  • FIX: (#9963) Editor: Consolidate connections from host gui scene to template nodes (by matgis)
  • FIX: (#9926) Editor: Correctly unpack unsigned short indices for models (by matgis)
  • FIX: (#10057) Editor: Fix dataflow issue that caused long sprite save times (by vlaaad)
  • FIX: (#10069) Fixed issue when the decoded sound sometimes wasn’t mixed into the ouput buffer (by JCash)
  • FIX: (#10070) Support 1 channel audio contexts on windows (by JCash)

Engine

NEW: (#10081) ‘Update Android SDK to version 35.0.1 and targetSdkVersion to 35’ by AGulev
Android SDK updated to the latest stable version 35.0.1

NEW: (#10033) ‘Update XCode to 16.2, MacOS SDK to 15.2, iOS SDK to 18.2’ by AGulev
Related https://github.com/defold/defold/issues/10036
Build toolchain updated with:

  • XCode 16.2
  • macOS SDK 15.2
  • iOS SDK 15.2

:warning: LuaJIT updated to the latest version for compatibility.

NEW: (#9889) ‘Add gamepad mapping for Core (Plus) Wired Controller’ by j-h-a
Add a mapping for the Core (Plus) Wired Controller to builtins/input/default.gamepads

NEW: (#9910) ‘New options for LiveUpdate: specifying a zip archive filename and placing the archive into the bundle folder.’ by AGulev
Two new options added into Live Update settings:

  • filename for a zip archive
  • and flag if archive should be moved into a bundle folder after bundling

NEW: (#9680) ‘Support using structs in uniforms’ by Jhonnyg
Vertex and fragment shaders can now use struct types:

struct CustomParameters
{
    vec4 params0;
    vec4 params1;
};

struct SceneData
{
    vec4 lightPositions[4];
    CustomParameters parameters; // some generic parameter, e.g camera position, scene bounding box or whatever.
};

uniform SceneUniforms
{
    SceneData scene;
};

uniform ParametersUniform
{
    CustomParameters customParameters;
};

void main()
{
    for (int i=0; i < 4; i++)
        color += calculateLight(scene.lightPositions[i], scene.parameters.params0);
    if (customParameters.params0.x > 0)
        // do something clever
    ...
}

Note that there are currently a few limitations on how to use structs in the engine - to read more head over to the <insert-manual-entry-here> section to read more.

NEW: (#9964) ‘Added response.url to http requests and progress callbacks’ by JCash
This allows the developer to get the url back in the callback, using the response.url variable.

NEW: (#9950) ‘Append raw texture data after protobuf header’ by Jhonnyg
The engine format for textures has been modified so that the data is stored after the protobuf message. This means that no texture unpacking is needed, and no extra buffer is needed to copy the data from the resource file.

NEW: (#9979) ‘Add astcenc for Linux ARM64’ by aglitchman
This PR adds astcenc package build for arm64-linux. Also modifies the build script, which allows you to successfully build a package for a specific commit from astcenc Git repository.

NEW: (#10009) ‘Cache only big files such as textures and fonts’ by AGulev
It’s faster to build most small resources than to read them, calculate their hash, and copy/paste them back and forth. However, this rule does not apply to large resources, such as textures and fonts, which take longer to build.

NEW: (#10018) ‘Ensure that Bob stops building immediately if any of the build steps fail’ by AGulev
Ensure that if the engine build fails, Bob stops building resources and displays the error.

FIX: (#9899) ‘Check if there’s a dynamic texture with the same id before creating it’ by britzl
This change fixes a regression with dynamic textures when creating a texture using gui.new_texture() with the same id as an already created texture. Previously this function returned gui.RESULT_TEXTURE_ALREADY_EXISTS, but when the dynamic gui textures functionality was unified with the resource system earlier this year this was overlooked.

FIX: (#9909) ‘Cleanup unused functions from the DMSDK vulkan API’ by Jhonnyg
The vulkan dmSDK has been slimmed down to reduce complexity of the library. If you are by any chance actually using any of these functions or structs, let us know so we can potentially re-add them!

FIX: (#9951) ‘Add initial dmsdk for WebGPU’ by Jhonnyg
Needed for WebGPU support in certain extensions (e.g rive).

FIX: (#9939) ‘GLFW3 support for linux’ by Jhonnyg
GLFW has been updated to version 3.4 for Linux (x86_64 and arm64).

FIX: (#9965) ‘Handle cube texture types properly’ by smagnuso
WebGPU can now use multi-imaged textures (cube maps and texture arrays).

FIX: (#10047) ‘Fix issue when Liveupdate excluded report is empty’ by AGulev

FIX: (#9969) ‘Added resource.create_sound_data() and writable “sound” property to sound component’ by JCash
This is the final step to creating new sounds at runtime.
It is also used to create streaming sounds, if not all sound data is provided all at once.

Short example:

local hash = resource.create_sound_data(relative_path, { data = data, filesize = filesize, partial = true })
go.set("#music", "sound", hash) -- override the previous sound resource
sound.play("#music") -- start the playing

FIX: (#9962) ‘Initialized liveupdate Lua module first, allowing using http/file providers without a bundle’ by JCash

This feature is good for e.g. streaming sounds over http. (More on that in the 1.9.8 release!)

Since the liveupdate module now is always present, you can instead check if the game was built using excluded files, using the new function liveupdate.is_built_with_excluded_files().

FIX: (#9922) ‘Improved reverse hash implementation performance’ by JCash

FIX: (#10000) ‘Remove argument to --tc’ by Jhonnyg
The --texture-compression argument in bob no longer requires a secondary flag to indicate wether or not texture compression should be applied according to the projects texture profile settings.

Before:

java -jar bob.jar --texture-compression=true # texture compression enabled
java -jar bob.jar --texture-compression=false # texture compression disabled

After:

java -jar bob.jar --texture-compression # texture compression enabled
java -jar bob.jar # texture compression disabled (argument omitted)

NOTE: bob is backwards compatible, meaning --texture-compression=false will work for the time being, but will likely be removed at a later time. A warning will be raised about the argument, but the feature will still work.

FIX: (#10008) ‘Added wasapi support for 2+ channel output devices’ by JCash

FIX: (#10013) ‘Fix windows app icon’ by Jhonnyg
Fixed an issue where the application icon on windows wasn’t showing due to a regression after updating to GLFW3.

FIX: (#10017) ‘Fix and add gamepad mappings for “Core (Plus) Wired Controller” and “HORIPAD S”’ by j-h-a

  • Fix RSTICK up/down axis index and RPAD_UP button type for Core (Plus) Wired Controller on osx
  • add linux mapping for same controller
  • add osx and linux mappings for HORIPAD S controller

FIX: (#10069) ‘Fixed issue when the decoded sound sometimes wasn’t mixed into the ouput buffer’ by JCash

FIX: (#10070) ‘Support 1 channel audio contexts on windows’ by JCash

Editor

NEW: (#9854) ‘Added the ability to specify custom templates for the project.’ by AGulev
It is now possible to specify custom templates for each project. To do so, create a new folder named templates in the project’s root directory, and add new files named default.* with the desired extensions, such as /templates/default.gui or /templates/default.script. Additionally, if the {{NAME}} token is used in these files, it will be replaced with the filename specified in the file creation window.

NEW: (#10027) ‘Automatically open the “Select Resource” window when adding a new GUI template node’ by AGulev
Simpler template node creation:

  • Automatically open the “Select Resource” window when adding a new GUI template node.
  • Use the filename of the GUI resource as the initial node ID.

NEW: (#10028) ‘Removed Git synchronization functionality from the editor’ by AGulev
Git synchronization functionality has been fully removed from the editor. Please use your preferred Git client instead.

NEW: (#10022) ‘Use new texture compression setup in texture profiles view’ by Jhonnyg
Texture profiles has been rewritten to support the new texture profile format where a texture compressor and a texture compressor preset can be selected. This also adds the ability to select ASTC as a compressor from the editor.

FIX: (#9963) ‘Editor: Consolidate connections from host gui scene to template nodes’ by matgis

  • Simplified the editor graph connections between host gui scenes and gui nodes imported from referenced templates. This saves a bit of memory in projects with a large number of gui nodes.
  • Nodes imported from template scenes that are assigned to a layer will now correctly use the layer configuration from the host scene when viewed in the editor.
  • Renaming a gui resource in a referenced scene will no longer erroneously update references that have been redeclared as a different resource in referencing scenes. I.e, if host.gui references template.gui, and they each declare a font named “header”, renaming it inside template.gui will not change host.gui, because there “header” refers to its the “header” font inside host.gui.
  • Improved sorting of choice box entries with numbers when referencing gui resources in the Properties View.

FIX: (#9926) ‘Editor: Correctly unpack unsigned short indices for models’ by matgis
Correctly unpack unsigned short indices when rendering models.

FIX: (#10057) ‘Editor: Fix dataflow issue that caused long sprite save times’ by vlaaad
Previously, saving a sprite caused its atlas to be laid out. We don’t do that anymore.

25 Likes

Setting arrays in constant buffer doesn’t work

    local constants = render.constant_buffer()
    constants.tint_array = { vmath.vector4(1, 0, 0, 1) }
    render.draw(predicates.model, { constants = constants })
uniform lowp vec4[10] tint_array;

void main()
{
    vec4 _tint = tint_array[0];

    gl_FragColor = vec4(_tint.rgb,1.0);
}

1.9.6:

1.9.7

1 Like

Could you share this repro?

constant buffer test.zip (52.4 KB)

1 Like

Thanks! @jhonny.goransson is looking into this issue now.

There should be a new version available now with a fix for the constant arrays.

2 Likes

Helo,

Many thanks for this release!! I updated from 1.9.6 but I have a problem with GUI node moving. When I select a GUI node and I move it with “Move Tool” (in the editor) the node very-very lag and slow move! I tested in Windows 11 and Linux Mint and present this bug on both systems.
So I downloaded 1.9.6. stable version and this problem nothing in my project, everything all right, no lagg and no slow moving!!

Test configs:

  1. Intel i7 / GTX1060 6GB / 16Gb RAM (Linux Mint with updated proprietary driver)
  2. AMD Ryzen 5 7530U / 16Gb RAM (Win 11 - Laptop)

Is this a BUG or other game project settings problem??

Sounds similar to this report on Discord

“Hey hello everyone, I have a problem with the recent builds of defold (I haven’t restarted defold since like 3 months, I cannot say since which build sorry…) Every 2 seconds the editor is ultra unresponsive if I open a 3d collection and with ctrl+click turned a bit in 3d. Like proper unresponsive for 1 second. Is there a thing like a cache I need to clean ? It happens even on non modified default 3d basic template project
It happens on 2d scenes, I just need to ctrl + click and drag on a scene and if I close my 3d scenes it works normally”

My problem only with GUI/Node!! Another 2D GameObject move are normal, not lag or slow move!

1 Like

I fixed this problem: I removed the gui material from Gui/Materials!!

That’s a workaround at most. There must be something with that material which the editor doesn’t like. Could you please share the material (and a small sample project if possible)?

1 Like

I use the Defold builtins gui.material!

I made a test with default builtins font material with my text nodes but the sindrome equal (lag and slow gui node movement). No material, no problem!!

Just asking here:
Updated Default to 1.9.7 and sys.open_url() stopped working in the iOS build. Has anyone encountered something similar?

P.S. Bug reported, issue opened

Hey,

I’m not sure if many people actually use CICD builds for Defold, but I noticed while trying to get one going on one of my game projects, that there was a breaking change in Defold v1.9.6. It requires an upgrade to JDK 21 to be able run bob the builder.

Both of the ones that worked for me before are failing since v1.9.6:

To solve it I’ve forked the latter one by gmantaos, so if you need a working CICD image for v1.9.6 or v1.9.7 you can grab it here: https://hub.docker.com/r/mattpwest/defold

I will try to keep it up-to-date, I have a channel on my Discord that tells me when a new Defold version releases.

From which version?

That is correct. It was mentioned in the release notes. Are you able to somehow contribute an improvement to those containers?

From 1.9.6