Defold 1.4.3 BETA

Defold 1.4.3

The latest beta is now released, and we invite those interested in beta testing the new features in the editor and engine to join now.

The beta period will be 2 weeks and the next planned stable release is two weeks from now.

Please report any engine issues in this thread or in issues using Help → Report Issue

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 Releases · defold/defold · GitHub

Set your build server to https://build-stage.defold.com

Release notes

Summary

  • CHANGE: (#7240) Update NDK 25 LTS (r25b)
  • NEW: (#7264) Factory dynamic prototype
  • NEW: (#7029) Add timer.get_info() function
  • NEW: (#7266) Update Android SDK (33.0.1 - Android 13 - API 33)
  • NEW: (#7296) Document ports and services
  • NEW: (#6902) Shader include support
  • NEW: (#7329) Update Screen Orientation options by Default on iOS and Android
  • NEW: (#7214) Create buffer in runtime
  • FIX: (#7312) Improve GUI modification performance
  • FIX: (#7315) Fix issue with components counter for cached resources
  • FIX: (#7337) Uploading empty index buffer on WebGL is very slow
  • FIX: (#7320) Fix issue when OGG file added to GO without component doesn’t work in bundle
  • FIX: (#7343) Show error in bob when referencing missing script resource properties
  • FIX: (#7355) Fix missing emitter fields of Initial Stretch X and Initial Stretch Y and Initial Angular Velocity for multiple emitters
  • FIX: (#7359) Moved dmProfile::HProfile/BeginFrame/EndFrame to the dmsdk for easier substitution
  • FIX: (#7370) Fixed issue with model vertex color in rgb format
  • FIX: (#7325) Fix Dependencies and Referencing Files popup showing blank entries for some resource types
  • FIX: (#7350) Fail the build on invalid requires
  • FIX: (#7363) Removed license header from debugger bootstrap script
  • FIX: (#7389) Fixed issue when calculating convex hull for atlas images

Engine

CHANGE: (#7240) Update NDK 25 LTS (r25b)
Defold updated from NDK r20 to NDK r25b - the latesNDK version at the moment.
Now minimum Android version API is 19 (Android 4.4)

NEW: (#7264) Factory dynamic prototype
We’ve added the possibility to change the prototype of a collectionfactory / factory component at runtime.
This allows the developer to load and spawn an arbitrary .collectionc/.goc file, further simplifying using dynamic content. The .collectionc/.goc` files still need to be part of the resource archive.

We’ve added a “Dynamic Prototype” checkbox to the factories. The prototype can only be overridden when this is checked. If set, then the collection component count cannot be optimized, and the owning collection will use the default component counts from game.project.

NEW: (#7029) Add timer.get_info() function
Sometimes it is needed to get additional information about a running timer, for instance the remaining time before it fires. This change adds a timer.get_info(handle) method which returns a table with information about a timer. Example:

local handle = timer.delay(2, true, function() end)

--after 0.5 seconds we call:

local info = timer.get_info(handle)
print(info.time_remaining) -- 1.5
print(info.delay)     -- 2
print(info.repeating) -- true

If timer cancelled or completed the function will return nil.

NEW: (#7266) Update Android SDK (33.0.1 - Android 13 - API 33)
Android SDK updated to version 33.0.1
Android target API updated to API level 33 (Android 13).

NEW: (#7296) Document ports and services
The engine ports and services are now documented in engine/docs/DEBUG_PORTS_AND_SERVICES.md.

NEW: (#6902) Shader include support
Added support for #include pragmas in shader files. This feature can be used to separate shader functions into modules that can be used across several shader files, which should help out with reusing code from your own project, or from asset extensions.

Read more in the manual: Shader programs in Defold

NEW: (#7329) Update Screen Orientation options by Default on iOS and Android
Use userLandscape, userPortrait and fullUser for android:screenOrientation on Android (read more). Use both UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown for portrait on iOS and UIInterfaceOrientationLandscapeLeft +UIInterfaceOrientationLandscapeRight for Landscape (read more).

NEW: (#7214) Create buffer in runtime
Added new function resource.create_buffer to create buffer resources dynamically in runtime. The function takes a buffer object created by other buffer resources, from the C api or via the lua buffer.create function.

API reference: API reference (resource)

FIX: (#7312) Improve GUI modification performance
This improves the editing performance of highly-referenced GUI files by around 25% (reduces the number of successors in a real-world project from 200k to 150k).

FIX: (#7315) Fix issue with components counter for cached resources
Now Bob considers changes in a linked GameObject when deciding to take a collection from the cache or rebuild it.

FIX: (#7337) Uploading empty index buffer on WebGL is very slow
When updating an empty index buffer, it took 90ms in my case.

FIX: (#7320) Fix issue when OGG file added to GO without component doesn’t work in bundle
Now bob converts ogg component (resource based component) into sound component when building.

FIX: (#7343) Show error in bob when referencing missing script resource properties
Bob now reports an error for missing script resource properties.

FIX: (#7355) Fix missing emitter fields of Initial Stretch X and Initial Stretch Y and Initial Angular Velocity for multiple emitters
Adds emitter fields of Initial Stretch X and Initial Stretch Y and Initial Angular Velocity to emitters that added after a particle effects that use more then one emitter. Previously these fields were missing from template.emitter which caused these fields to be greyed out for particle effects that used more than one emitter. Also clicking on those fields and adding a value causes an error java.lang.NullPointerException: Unknown.

FIX: (#7359) Moved dmProfile::HProfile/BeginFrame/EndFrame to the dmsdk for easier substitution
This change allows for easier custom implementation of the profiling data in an extension.

FIX: (#7370) Fixed issue with model vertex color in rgb format
This fixes an issue when importing vertex colors in 3-tuples. We convert it into 4-tuples, with alpha=1.0f.
It is now also possible to avoid setting any textures at all in case your model doesn’t need them.

FIX: (#7336) Use min x and y scale for particle effect scale in gui
The previous fix for particle effect scale only partially solved the problem of inconsistent particle effects scaling between gui and game objects. The original issue was that the x component of the scale was always used when scaling in the gui. The partial fix applied in #7163 used the smallest scale component of x, y and z, which made particle effect scaling in gui more consistent. The problem is that on window resize only the x and y component of the scale of a gui node is affected while the z component remains at its original value, which would produce an incorrect result for particle effects.

The correct solution, which is applied in this fix is to use the smallest of the x and y component when applying a scale to particle effects in gui. This is consistent with how other nodes are scaled and it is also consistent with how particle effects on game objects are scaled using smallest uniform scale value (using x, y, z in 3d/go and only x and y in 2d/gui).

Editor

FIX: (#7325) Fix Dependencies and Referencing Files popup showing blank entries for some resource types
Fix Dependencies and Referencing Files popup showing blank entries for some resource types

FIX: (#7350) Fail the build on invalid requires
The editor will now fail the build if a script file requires an existing lua module, but starts the require argument string with a slash.

FIX: (#7363) Removed license header from debugger bootstrap script
The Defold license was accidentally applied to the debugger bootstrap script which made the script too large to send as a message when attaching the debugger.

FIX: (#7389) Fixed issue when calculating convex hull for atlas images
The hull calculation was incorrect and produced overlapping triangles.

27 Likes

NEW : (#7264 ) Factory dynamic prototype

NEW : (#7029 ) Add timer.get_info() function

NEW : (#6902 ) Shader include support

Especially for these 3 items. This release will be impressive… Wow

4 Likes

That factory feature made my day!

2 Likes

Are any of the remaining todo items in the 1.4.3 project likely to make it for this version?

1 Like

No I’m afraid not. My ambition was that we would be able to ship a few of them, but unfortunately a lot of work got delayed. Is there any issues in particular that you think of?

1 Like

Amazing! :heart:
Thank you for adding documentation for this too! (even though it’s beta, but I hope it won’t confuse anyone in the upcoming two weeks :smiley: )

Edit: The note there should point to 1.4.3, right?

3 Likes

Ah yes, that’s true, thanks!

2 Likes

https://github.com/defold/defold/issues/6789 has been active (i.e. todo in multiple releases) for a while

1 Like

Will this enable the work to detect modern Android “back” swipe gestures?

1 Like

Updated SDK unblocks this task (can’t be implemented without using the latest SDK).
So, yes we gonna implement the Android 13 Back gesture, but I can’t give you any time estimations.

These kinds of errors are tricky. I wasn’t able to reproduce it on any of my phones which makes it hard to fix.

I asked for some extra data from you, which might be helpful (pls take a look the ticket)

3 Likes

As you know we’ve spent quite a bit of time trying to solve the issue without success. I’ve kept adding it to each release project to not forget about it.

1 Like

Hmm. Until now, we needed separate factory components for each object or collection. In what scenarios would it be advisable to use the dynamic setting over the static setting? I don’t really understand the tradeoffs.

I would say that using separate factory components will still be the most common usecase and the one recommended for almost every scenario.

If you have a lot of different game object or collection prototypes in your game (perhaps downloaded using Liveupdate) but you only ever need to spawn one of them then it might simplify your code and your resource management if you only have a single factory component and set which prototype it should spawn.

4 Likes

@britzl is it advisable to use once collection factory to spawn an object, then change the collection and spawn another? This would happen before the screen fades in.

I wouldn’t recommend such usage of the feature.
Our build system counts components in a world (the collection spawned using collection proxy).
If some component’s count is static - then this collection will allocate this exact amount of memory, if some components are dynamic, then count will be taken from game.project.

So, fo example:

Collection (world spawned with collection proxy) 
-go
--sprite
--factory with `Dynamic Prototype` unchecked
----go
------label

will allocate 1 sprite and label->max_count labels, because labes componens is in factory and you can spawn many of them. The rest of component will not allocate anything (because we analyze your collection and see you can’t spawn them).

But if you use Dynamic Prototype then all the component will be dynamic and this collection will take counters for each component from game.project.
For our example:

Collection (world spawned with collection proxy) 
-go
--sprite
--factory with `Dynamic Prototype` checked
----go
------label

this collection will allocate sprite->max_count of sprites label->max_countof labes and so on for all the components.


This feature isn’t a hack that makes Defold engine dynamic. I do not recommend to use it just because “I don’t wanna make a factory”.
This feature solves the one particular problem: an ability to spawn downloadable content in existent world (a collection which is loaded using collection proxy).

It’s important when you have your main game and a lot of customizable, seasonal content you don’t wanna deliver to all the users.

Let’s say you have a shooter with a season pass. For people who passed the season pass you give a unique character skin.
All the new users will not be able to get it, because they didn’t pass this particular season. So you wanna this content in your main game collection for some count of player who have it on their accounts, but not all of them. Then this feature is your choice!

I hope now it’s clear.

12 Likes

Very good explanation, thank you.

2 Likes

@AGulev we should include this in the documentation for this feature!

9 Likes

I’ve updated the beta with a fix for sprite trimming in atlases.
@sergey.lerg if you want to test it out.

3 Likes

That was quick! Thanks.

4 Likes