Defold 1.4.1 has been released

Defold 1.4.1

Summary

  • NEW: (#7139) Use standard gamepad mapping for unknown gamepads in HTML5
  • NEW: (#248) Automatically create Android R.java files for all Gradle dependencies
  • NEW: (#7124) resource.set_texture improvements
  • NEW: (#7154) Create texture resource in runtime
  • NEW: (#7179) Added configfile extension functionality to dmSDK
  • NEW: (#7158) DEFEDIT-7152 Added preference to disable loading of external changes on app focus
  • FIX: (#7133) Remove old rig.max_instance_count counter.
  • FIX: (#7143) Add serialization nested depth limit to the debugger
  • FIX: (#7155) Added opt-in for Lua bytecode deltas
  • FIX: (#7171) Fix crash when max sound instances is 0

Engine

NEW: (#7139) Use standard gamepad mapping for unknown gamepads in HTML5
This change adds support for a standard gamepad mapping in html5 builds. The standard gamepad is defined in the default.gamepads (in builtins) with device name “Standard Gamepad”. This mapping will be used for any gamepad that is identified as a standard gamepad in the Gamepad API.

The standard gamepad mapping is defined as 16 button gamepad with 2 analog sticks with a button layout very similar to a PlayStation or Xbox controller (see the W3C definition and button layout for more information).

NEW: (#248) Automatically create Android R.java files for all Gradle dependencies
This change automatically adds each resolved Android Gradle dependency containing resources as an extra package when linking resources using aapt2. This reduces or completely removes the need to specify aaptExtraPackages in ext.manifest.

NEW: (#7124) resource.set_texture improvements
Added new functionality to the resource.set_texture function - you can now update a specific region of the texture as well as update only a specific mipmap with new data. This is done by setting the new “table” argument values:

local header = {
	width = ...,
	height = ...,
	type = ...,
	format = ...,
	x = number, -- New field
	y = number, -- New field
	mipmap = number, -- New field
}

NEW: (#7154) Create texture resource in runtime
Added a function to create texture resources dynamically in runtime. Use the new function resource.create_texture(path, args) to create a texture, and then go.set to assign it to components or resource properties like any other resource.

NEW: (#7179) Added configfile extension functionality to dmSDK
We’ve added new extension macro DM_DECLARE_CONFIGFILE_EXTENSION in dmsdk/dlib/configfile.h.
The extension allows extension developers to provide custom properties, or override existin ones.

In order to fully utilize this mechanic, we’ve created the sys.get_config_string(), sys.get_config_int() and sys.get_config_number() functions. The old sys.get_config()is now deprecated, in favor of sys.get_config_string().

FIX: (#7133) Remove old rig.max_instance_count counter.
Remove old deprecated max counter rig.max_instance_count which was the reason of minimum 128 max_count for model component.

FIX: (#7143) Add serialization nested depth limit to the debugger
Lua debugger table serialization now has a nesting limit of 100 depth levels. Deeper tables will not be serialized and instead will be shown as e.g. ...0x0119a21230. This also prevents stack overflow exceptions on breakpoints if very deeply nested structures (without circular references) are used.

FIX: (#7155) Added opt-in for Lua bytecode deltas
Moved Lua bytecode delta generation behind a bob flag (--use-lua-bytecode-delta). The default behavior is now to bundle with full 64 and 32 bit bytecode for multi-architecture builds (primarily on Android). Just like before when bundling for a single architecture only bytecode for that architecture will be included.

FIX: (#7171) Fix crash when max sound instances is 0
Fixed a crash when max sound instances is 0 in game.project

Editor

NEW: (#7158) DEFEDIT-7152 Added preference to disable loading of external changes on app focus

  • Added checkbox Load External Changes on App Focus to the General Preferences page. When disabled, the editor won’t scan for external changes when it receives focus. A new menu entry Load External Changes will appear in the File menu so users can trigger the process manually.
  • Moved Code Editor Font setting from the General Preferences page to the Code Preferences page.
30 Likes

Lovely! As always, thank you! :wink:

6 Likes

Can we create one texture with different images in it and change sprite animation at runtime like we use standard atlas and sprite.play_flipbook?

In 1.4.2 we’ll release an Atlas API where you can both create new atlases and get information about existing atlases. This will be very useful information when you need to update a sub-region of a texture.

What you can do in 1.4.1 is to update a texture and set it on a sprite. But you have to know which part of the texture to update (this is what will be easier to do in 1.4.2).

7 Likes

Can we create textures from any image file in custom resources folder?
I’m afraid not, so it would be nice to have an example of using this new feature.

1 Like

You can use, for example, imageloader and get the buffer data. Then you can add the buffer data to the texture.

1 Like

Documentation for this can be found in the Atlas manual.

3 Likes