Defold 1.9.4 Beta
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 GitHub: Release v1.9.4 - beta · defold/defold · GitHub
Summary
- NEW: (#9474) The physics contact_point_event now returns the correct contact point
- NEW: (#9413) Upgrade emscripten to 3.1.65
- NEW: (#9383) Start work on WebGPU adapter
- NEW: (#9438) New vmath functions
- NEW: (#9441) Added a font name to the .glyph_bank generated name
- NEW: (#9450) Add configurable options for emscripten compiler.
- NEW: (#8743) Instancing support for models
- NEW: (#9415) Added font glyph api to dmSDK
-
NEW: (#9388) Improved
Debug->Simulate Resolution
functionality - NEW: (#9393) Show logs from a selected target in the editor’s console
-
NEW: (#9440) Build only the WASM version of the engine when running
Build HTML5
- FIX: (#464) Fix issues building certain combinations of pod dependencies
- FIX: (#9414) Added dmUtf8 to dmSDK
-
FIX: (#9477) Added
android:appCategory="game"
intoAndroidManifest.xml
- FIX: (#9483) Fix the build report in JSON format.
- FIX: (#9487) Updated zlib to 1.3.1.1
- FIX: (#9511) Fix editor-related build scripts on windows
- FIX: (#9532) Fix for double destroying the timer callback
- FIX: (#9539) Fixed rare crash when reaching max number of animations
- FIX: (#9419) Retain gui overrides if the template gui scene is modified externally
- FIX: (#9426) Fix the issue where the hash script property can’t be reversed
- FIX: (#9425) Fix text sync with language servers
- FIX: (#9429) Better handling of errors in tilemaps when the tilesource is broken.
-
FIX: (#9444) Fix the detection of
require
in a tail function call by the editor. -
FIX: (#9510) Make the building artifacts independent for the
Build HTML5
andBuild
options -
NEW: (#9531) Add
editor.bob()
function to editor scripts
Engine
NEW: (#9474) The physics contact_point_event now returns the correct contact point
This is a bug fix for the contact_point_event
, where the position
is now the contact point itself.
This makes it similar to the contact_point_response
event, which was the intention.
If you need the old position (the world position of the object itself), you can use either message.a.instance_position
/message.b.instance_position
.
NEW: (#9413) Upgrade emscripten to 3.1.65
Emscripten has been updated to 3.1.65 from 3.1.55. This is a prerequisite for the coming WebGPU support
NEW: (#9383) Start work on WebGPU adapter
WebGPU has been added as an experimental graphics backend for web platforms. To test WebGPU, run bob.jar with the following commands in the project folder of your project:
java -jar path-to-latest-bob.jar build bundle --archive --platform=js-web --debug-output-wgsl=true
Note that this is a technical preview
of our WebGPU support, and some things are not yet implemented. It is not recommended to publish an application yet that uses this backend, but it is encouraged to try it out!
NEW: (#9438) New vmath functions
Added new vmath
functions:
-
vmath.quat_matrix4
- get quaternion from matrix4 -
vmath.matrix4_compose
- create matrix4 from translation (vector3|vector4), rotation (quaternion) and scale (vector3) -
vmath.matrix4_scale
- create matrix4 from scale (vector3) or from number (uniform scale) or 3 number (x, y, z) -
vmath.clamp
- clamp input value in range [min, max]. Input value can be number, vector, vector3, vector4. In case of vector type clamp applies per vector component.min
,max
also can be number, vector, vector3, vector4.
NEW: (#9441) Added a font name to the .glyph_bank generated name
The .glyph_bank
filename now includes the name of the font used for glyph bank generation.
NEW: (#9450) Add configurable options for emscripten compiler.
Add options to application manifest to control stack size (stackSize
)/overall memory size (initialMemory
)/minimum supported browser versions (minSafariVersion
/minChromeVersion
/minFirefoxVersion
). In some cases it can help to reduce binary size because Emscripten doesn’t apply code-generation for supporting old browsers.
NEW: (#8743) Instancing support for models
Model components can now use hardware instancing! This means that models that share the same mesh but has its own transform and normal matrices can now be rendered with a single draw call instead of individual draw calls. This is useful for repeated geometry, such as trees, foliage, static props such as trash cans, boxes or even complete buildings.
The simplest route to start using instancing is to add an attribute in the vertex shader that holds the world matrix
, or a normal matrix
:
attribute mat4 mtx_world;
attribute mat4 mtx_normal;
When any attribute is marked as an instanced attribute, instanced draw calls will automatically be created. This also works for custom vertex attributes. Here’s an example of using an custom instanced attribute for storing an individual tint attribute per model:
The color attribute in this case has its vertex step function
marked as instance
in the material, which means that this attribute will be repeated per instance instead of per vertex:
This enables us to draw all boxes with just one draw call instead of 4, even with custom vertex data per model!
To read more about instancing in Defold, please consult the Manual entry.
A simple example that shows how to use the new functionality is available here:
instancing-test.zip
FIX: (#464) Fix issues building certain combinations of pod dependencies
This issue fixes issues when building for instance the Yandex SDK
Fixes #389
FIX: (#9414) Added dmUtf8 to dmSDK
This allows native extensions to easily convert utf8 strings into codepoints, for use with e.g. font generation.
The header file is located at <dmsdk/dlib/utf8.h>
FIX: (#9477) Added android:appCategory="game"
into AndroidManifest.xml
Google Play requires the android:appCategory
attribute in the AndroidManifest.xml
. Since Defold is a game engine, we have added android:appCategory="game"
into the default AndroidManifest.xml
.
If you need a different category for your app, create a custom manifest and choose the appropriate category: R.attr | Android Developers.
[!WARNING]
If you already have a customAndroidManifest.xml
, please take note of these changes.
FIX: (#9483) Fix the build report in JSON format.
Fix the issue where the build report in JSON format is not being generated.
FIX: (#9487) Updated zlib to 1.3.1.1
FIX: (#9511) Fix editor-related build scripts on windows
When running on Windows (MinGW), invoking run.command
didn’t forward the env variables to the program. Previously, we had a code that did env JAVA_CMD=.../bin/java bash ./scripts/lein ...
, and I removed it in favor of using the env = lein_env
kwarg without knowing about the implications for Windows. Restoring.
FIX: (#9532) Fix for double destroying the timer callback
In rare cases, the timer callback was destroyed twice, causing a crash
Editor
NEW: (#9415) Added font glyph api to dmSDK
We’ve added a api to our dmSDK for manipulating font resources.
This allows for writing extensions such as extension-font, making it possible to avoid storing large amounts of pre rendered glyph images in the default game, and instead generate them at runtime.
The api has been added to dmsdk/gamesys/resources/res_font.h
.
#include <dmsdk/gamesys/resources/res_font.h>
dmRender::HFont dmGameSystem::ResFontGetHandle(FontResource* font);
dmResource::Result dmGameSystem::ResFontGetInfo(FontResource* font, FontInfo* info);
dmResource::Result dmGameSystem::ResFontGetCacheCellInfo(FontResource* font, uint32_t* width, uint32_t* height, uint32_t* max_ascent);
bool dmGameSystem::ResFontHasGlyph(FontResource* font, uint32_t codepoint);
dmResource::Result dmGameSystem::ResFontAddGlyph(FontResource* font, uint32_t codepoint, FontGlyph* glyph, void* imagedata, uint32_t imagedatasize);
dmResource::Result dmGameSystem::ResFontRemoveGlyph(FontResource* font, uint32_t codepoint);
NEW: (#9388) Improved Debug->Simulate Resolution
functionality
A few improvements were made to the Debug->Simulate Resolution
functionality in the editor:
- The selected resolution is now saved for a project, including custom resolutions.
- The selected resolution is applied every time the engine starts.
- A few new iPhone devices and a new “Handheld” section were added.
- Resolution simulation now works for all launched instances.
NEW: (#9393) Show logs from a selected target in the editor’s console
When a remote target is selected, the editor tries to connect to the target’s log service to display them in the console.
NEW: (#9440) Build only the WASM version of the engine when running Build HTML5
Building two versions of the engine can take a long time, and considering that WASM is supported by 100% of modern browsers, it doesn’t make sense to build both versions every time a developer wants to test a game.
From now on, Build HTML5
will build only the wasm
version of the engine.
FIX: (#9419) Retain gui overrides if the template gui scene is modified externally
Fixed an issue where gui node property overrides would be lost from referencing .gui
files if the referenced template .gui
file was modified by an external process.
FIX: (#9426) Fix the issue where the hash script property can’t be reversed
Hash values can be reversed to their string equivalents in Debug builds, simplifying the development process. This fix makes hashes added in go.property()
reversible as well.
FIX: (#9425) Fix text sync with language servers
FIX: (#9429) Better handling of errors in tilemaps when the tilesource is broken.
If a tilemap uses a tilesource without a texture, it’s impossible to show the palette, which previously resulted in an error.
FIX: (#9444) Fix the detection of require
in a tail function call by the editor.
Fixed an issue where using a tail call with require
was impossible in the editor:
local result = require("my_module").call(42)
FIX: (#9510) Make the building artifacts independent for the Build HTML5
and Build
options
From now on, the Build HTML5
and Build
options produce separate build artifact folders in the build
directory. This means alternating between these options will no longer require rebuilding the project from scratch each time, speeding up the workflow for HTML5 testing.
NEW: (#9531) Add editor.bob()
function to editor scripts
Now you can perform bob tasks using editor scripts. Some examples:
- Print help in the console:
editor.bob({help = true})
- Bundle the game for the host platform:
local opts = { archive = true, platform = editor.platform } editor.bob(opts, "distclean", "resolve", "build", "bundle")
- Use a custom build server and extra settings files for overriding
game.project
settings:local opts = { archive = true, platform = editor.platform, build_server = "https://build.my-company.com", settings = {"test.ini", "headless.ini"} } editor.bob(opts, "distclean", "resolve", "build")