Defold 1.9.6
Summary
- BREAKING CHANGE: (#9784) Set clearcolor alpha to one by default (by Jhonnyg)
- NEW: (#9730) Enable instanced arrays on WebGL 1.0 (by aglitchman)
- NEW: (#9830) Shaderc library based on spirv cross (by Jhonnyg)
- NEW: (#9827) Added threading of archive builder (by britzl)
- NEW: (#9847) Camera components should have precedence in the default render script (by Jhonnyg)
- NEW: (#9762) Threaded resource builds when using bob.jar (by britzl)
- NEW: (#9554) Added support for getting the type of a GUI node at runtime (by VowSoftware)
- NEW: (#9831) Add ALLOW_UNIMPLEMENTED_CALLS=0 to reduce build size. (by ekharkunov)
- NEW: (#9835) Remove deprecated stackTrace symbol. (by ekharkunov)
-
NEW: (#9701) Add euler/quat conversion functions to
vmath
(by aglitchman) - NEW: (#9648) Added engine support for arm64-linux platform (by JCash)
-
NEW: (#9724) Reduce the size of
bob.jar
and the Editor by removing the default dmengine for rarely used platforms (by AGulev) - NEW: (#9728) Wait for the reload to finish before building (by vlaaad)
- NEW: (#9757) Engine Arguments field in preferences (by AGulev)
- NEW: (#9766) Better “Build HTML5” options (by AGulev)
- NEW: (#9810) Add new toggles “Grid” and “Component Guides” into the Scene View visibility popup (by AGulev)
- NEW: (#9721) Respect alphabits and create GL context with correct configuration. (by ekharkunov)
- FIX: (#9706) Strip clrf line endings from shader source (by Jhonnyg)
- FIX: (#9792) Use actual dpi value in glfw get display scale factor (by Jhonnyg)
- FIX: (#9815) ParticleFx vertex buffer batch update (by JCash)
- FIX: (#9828) Improve FS synchronization (by ekharkunov)
-
FIX: (#9834) Use more precise method to calculate
dt
(by AGulev) -
FIX: (#9843) Fixed an issue with the incorrect
time_elapsed
value in the repeating timer callback. (by AGulev) - FIX: (#9848) Fixed issue where go.property(msg.url(“socket”, “path”, “fragment”)) (with 3 arguments) could not be parsed by Bob. (by AGulev)
- FIX: (#9860) Fixed the GUI properties iterator (by AGulev)
- FIX: (#9456) Added Wasapi sound backend for Windows (by JCash)
-
FIX: (#9867) Fix issue when
max_instances
value is wrong when components count more than GOs count (in collection withous factories) (by AGulev) - FIX: (#9841) Fix rare case of double initialization in web build (by ekharkunov)
- FIX: (#9861) Fix profiler ‘view peak frame’ mode. (by ekharkunov)
- FIX: (#9862) Return correct ‘sys.open_url’ result for html5 (by ekharkunov)
- FIX: (#9686) Fix search in files after deleting files (by vlaaad)
- FIX: (#9552) Fixed an issue where trimmed images in the atlas displayed incorrect outlines (by AGulev)
- FIX: (#9765) Update JDK and JavaFX (by vlaaad)
- FIX: (#9871) Consider successors from implicit connections inherited by override nodes (by matgis)
- FIX: (#9884) Rewrote Gui layout editing to work efficiently with templates (by matgis)
Engine
BREAKING CHANGE: (#9784) ‘Set clearcolor alpha to one by default’ by Jhonnyg
The default clearcolor alpha value is now 1.0 in game.project.
NEW: (#9730) ‘Enable instanced arrays on WebGL 1.0’ by aglitchman
WebGL 1.0 now also supports instanced arrays if the appropriate ANGLE_instanced_arrays
extension is available on the user’s device.
NEW: (#9830) ‘Shaderc library based on spirv cross’ by Jhonnyg
The spirv-cross command-line binary has been replaced with a library version of the tool that does the same thing, which means that we don’t need to write intermediate files when crosscompiling, and we can now reconfigure resource bindings however we want. This means that we can merge resources between fragment and vertex program, change location decorations for input/output bindings and much more!
NEW: (#9827) ‘Added threading of archive builder’ by britzl
NEW: (#9847) ‘Camera components should have precedence in the default render script’ by Jhonnyg
The default render script has been updated to take camera components into account - if there are camera components in the scene, they will be used in favor of the various “projection modes” specified in the render script. For a camera component to be used in rendering, a need function has also been added to the camera API:
camera.get_enabled(url)
This function can be used to check wether or not a camera is enabled or not. If there exists multiple camera components in the scene, the last enabled camera will be used for rendering. This is usually the camera component created last, but enabling and disabling camera components can change this order in the engine as well.
NEW: (#9762) ‘Threaded resource builds when using bob.jar’ by britzl
The bob.jar command line tool will now use multiple threads when project resources are built. It is possible to control the number of threads used when building resources using the --max-cpu-threads
option:
- If the
--max-cpu-threads
option is not provided the number of threads will be based on the number of available processors (CPU cores). - If
--max-cpu-threads
is a positive value the number of threads will be equal to this value. Note that it is possible to use more threads than available processors, and it may in fact result in even faster builds since there’s less overhead from thread reuse. - If
--max-cpu-threads
is a negative value the number of threads will be equal to the number of processor minus this value (minimum 1 thread).
NEW: (#9554) ‘Added support for getting the type of a GUI node at runtime’ by VowSoftware
Added support for getting the type of a GUI node at runtime.
The gui.get_type()
function returns one of the following constants:
gui.TYPE_BOX
gui.TYPE_TEXT
gui.TYPE_PIE
gui.TYPE_PARTICLEFX
gui.TYPE_CUSTOM
If the node uses a custom type, then the hash
name of the custom type is returned as a secondary value.
local node = gui.new_box_node(vmath.vector3(100, 100, 0), vmath.vector3(20, 20, 1))
local type, subtype = gui.get_type(node)
pprint(type, subtype) -- 0 (gui.TYPE_BOX), nil
Resolves #9358
NEW: (#9831) ‘Add ALLOW_UNIMPLEMENTED_CALLS=0 to reduce build size.’ by ekharkunov
Added build options which remove stubs linkage. Should reduce build size.
NEW: (#9835) ‘Remove deprecated stackTrace symbol.’ by ekharkunov
NEW: (#9701) 'Add euler/quat conversion functions to vmath
’ by aglitchman
Two new functions have been added to the vmath
module to convert euler angles to quaternion and vice versa. Euler angles are often used to simplify handling the rotation of objects.
-
vmath.quat_to_euler
- converts a quaternion into euler angles. -
vmath.euler_to_quat
- converts euler angles into a quaternion.
local q = vmath.quat_rotation_z(math.rad(90))
print(vmath.quat_to_euler(q)) --> 0 0 90
local q2 = vmath.euler_to_quat(0, 45, 90)
print(q2) --> vmath.quat(0.27059805393219, 0.27059805393219, 0.65328145027161, 0.65328145027161)
NEW: (#9648) ‘Added engine support for arm64-linux platform’ by JCash
This change adds support for arm64 Linux (platform identifier arm64-linux
), for use on hardware such as Rasberry Pi.
FIX: (#9706) ‘Strip clrf line endings from shader source’ by Jhonnyg
Carriage return line endings are now stripped from shader code.
FIX: (#9792) ‘Use actual dpi value in glfw get display scale factor’ by Jhonnyg
Fixes an issue where the glfwGetDisplayScaleFactor
function always returns 1 on web. The function will now take window.devicePixelRatio
into account, since this is what the glfw implementation is using as well.
FIX: (#9815) ‘ParticleFx vertex buffer batch update’ by JCash
This allows for a smaller CPU memory usage when updating the GPU vertex buffer.
There is a new property particle_fx.max_particle_buffer_count
(default 1024) that controls how many particles will fit into the CPU buffer, effectively limiting CPU memory usage.
The previous property particle_fx.max_particle_count
(default 1024), is now the limit of the GPU vertex buffer size.
FIX: (#9828) ‘Improve FS synchronization’ by ekharkunov
[HTML5 only] Fixed issue when several http.request
with option path
led to stop syncing MemoryDB->PersistentDB and as a result - losing saved data after page reload
FIX: (#9834) 'Use more precise method to calculate dt
’ by AGulev
Fixes an issue where dt
occasionally becomes 0.5s, causing jitters in the game.
Also, a new function has been introduced in dmsdk
: dmTime::GetMonotonicTime()
. This is the recommended way to measure time intervals (i.e., the time elapsed between events).
FIX: (#9843) ‘Fixed an issue with the incorrect time_elapsed
value in the repeating timer callback.’ by AGulev
FIX: (#9848) ‘Fixed issue where go.property(msg.url(“socket”, “path”, “fragment”)) (with 3 arguments) could not be parsed by Bob.’ by AGulev
FIX: (#9860) ‘Fixed the GUI properties iterator’ by AGulev
Fixed a bug with the GUI properties iterator (used in the Poco extension) where properties were mixed up.
FIX: (#9456) ‘Added Wasapi sound backend for Windows’ by JCash
This replaces our old OpenAL implementation, and also allows us to reuse the backend for XBox platform.
With this change, we no longer ship the OpenAL.dll+wrap_oal.dll files, thus making the build size a little bit smaller.
We expect no behavioral changes at runtime due to this change.
FIX: (#9867) ‘Fix issue when max_instances
value is wrong when components count more than GOs count (in collection withous factories)’ by AGulev
FIX: (#9841) ‘Fix rare case of double initialization in web build’ by ekharkunov
Fix rare case of double initialization in web build.
FIX: (#9861) ‘Fix profiler ‘view peak frame’ mode.’ by ekharkunov
FIX: (#9862) ‘Return correct ‘sys.open_url’ result for html5’ by ekharkunov
Editor
NEW: (#9724) ‘Reduce the size of bob.jar
and the Editor by removing the default dmengine for rarely used platforms’ by AGulev
armv7-android
, js-web
, and x86-win32
dmengine files were removed from bob.jar
to reduce its size. It is still possible to bundle default builds (builds without native extensions) for these platforms, but dmengine
will be downloaded as needed.
Additionally, some duplicates in the Editor’s archive were removed to further reduce its size.
NEW: (#9728) ‘Wait for the reload to finish before building’ by vlaaad
When the user focuses on the editor, it performs a resource reload. On large projects this may take a while, and if the user starts a build, the build will use outdated resources. This change fixes the issue by waiting for the reload to finish before starting the build.
NEW: (#9757) ‘Engine Arguments field in preferences’ by AGulev
It is now possible to add engine arguments in the editor’s preferences. The value is saved on a per-project basis.
NEW: (#9766) ‘Better “Build HTML5” options’ by AGulev
Build HTML5 no longer fetches dependencies to speed up the build process.
If you need to clean the build folder and fetch dependencies, use Rebuild HTML5.
Both options now have shortcuts:
NEW: (#9810) ‘Add new toggles “Grid” and “Component Guides” into the Scene View visibility popup’ by AGulev
“Grid” and “Component Guides” added into the Scene View visibility popup for better discoverability
NEW: (#9721) ‘Respect alphabits and create GL context with correct configuration.’ by ekharkunov
FIX: (#9686) ‘Fix search in files after deleting files’ by vlaaad
FIX: (#9552) ‘Fixed an issue where trimmed images in the atlas displayed incorrect outlines’ by AGulev
Fixed an issue where the editor displayed incorrect outlines for a rotated image in an atlas with trimmed mode.
FIX: (#9765) ‘Update JDK and JavaFX’ by vlaaad
Update editor and bob JDKs to 21.
While no action is required for the typical use of Defold (i.e. building and bundling from the editor), workflows that use the command line bob.jar
need to update the JDK version to 21.
FIX: (#9871) ‘Consider successors from implicit connections inherited by override nodes’ by matgis
Fixed an issue where stale values would be retained in the editor system cache in certain scenarios involving overrides.
FIX: (#9884) ‘Rewrote Gui layout editing to work efficiently with templates’ by matgis
- Fixed various fundamental issues around Gui templates and layouts in the editor. You should now be able to freely combine Gui templates and layouts without worry.
- Projects that use a lot of Gui templates will load faster and use less memory.
- When renaming a resource (such as a font) inside a Gui scene, we will update references to the original name in layouts and scenes that import it as a template.
- Clearing an overridden property will no longer focus on and select all text in the cleared field in the Property Editor.