Defold 1.2.115 has been released

Defold 1.2.115

This release adds the possibility to dynamically load/unload resources in collection factories and gameobject factories. Ray casts will now post a response even if the result from the ray cast was a miss. We have also upgraded our CI build pipeline and native extension server to Ubuntu 16.04, and updated LuaJIT to a newer version.

Dynamic load/unload on factory resources

The ability to mark a collection factory or game object factory to load its resources dynamically, so that the assets are not loaded into memory until the first time the item is created. Once all references to one of these assets are deleted the assets are be unloaded from memory.

Software VSync

Added the possibility to set vsync swap interval. This makes it possible to for example expose this as a setting in your game. For desktop platforms, if swap_interval is set to 0 the engine will try to respect the update_frequency setting from game.project in software instead of relying entirely on hardware vsync. Use by posting message: msg.post("@system:", "set_vsync", { swap_interval = 1 })

Minimum Ubuntu version bumped to 16.04

Since we want to move towards a much more unified build pipeline for our CI and the native extension server,
we decided to upgrade all our linux machines to Ubuntu 16.04 (Which the NE server runs). This version will now be our baseline with which we will continue to test features.

This also means that the compiler got updated (to gcc 5.4), and as such, we needed to update some of the libraries we use.

Note: The engine might still run on older Ubuntu versions, but the Editor will not be able to build projects on lower versions.

LuaJIT

We’ve updated the luajit library to version 2.0.5 and have enabled JIT for 64 bit OSX also.

Engine

  • DEF-2760 - Added: Dynamic loading/unloading of collectionfactory and factory resources
  • DEF-1101 - Added: Ray cast response on miss
  • DEF-1785 - Added: Software vsync
  • DEF-2913 - Added: Updated PVRTexLib to version 4.18
  • DEF-1284 - Added: Updated LuaJIT to version 2.0.5
  • DEF-2914 - Fixed: Collectionfactory and factory resource was not loaded when parent collection was loaded
  • DEF-2902 - Fixed: Improve handling of erroneous mesh input data
  • DEF-2915 - Fixed: “ERROR:RESOURCE: Empty resource path” is spammed in console
  • DEF-2907 - Fixed: Spine draw order out of bounds
  • DEF-2891 - Fixed: Fixing invalid MathUtil::decompose and quaternionFromMatrix.

Documentation

Documentation is going through a slow metamorphosis from larva (Editor 1) via pupa (currently) to butterfly (Editor 2).

Work in progress

Native Extensions + Linux

The upgrade of our CI machines was a big step towards supporting Linux as a platform in Native Extensions.

We’ve also decided to remove the 32 bit OSX + Linux support for the engine itself. This will remove two very old platforms for us; 32 bit OSX is obsolete, and Editor 2 only supports 64 bit Linux.

20 Likes

Whoa, meaty update. Awesome!

8 Likes

Did you lower the cap on resources while working with dynamic loading? Or maybe it wasnt there at all earlier?
All of a sudden (when updated editor) I cannot even start my project as it is spamming
"ERROR:RESOURCE: The max number of resources (1024) has been passed, tweak “resource.max_resources” in the config file."

It is of course fixed tweaking the value.

I fixed a bug which isn’t included in the above list which is quite a substantial fix. Sven is adding that.

DEF-2914 "Collectionfactory and factory resource not loaded when parent collection is loaded"
You can see more info here (Ragnars comment)

This means that previously (prior to 1.2.115) resources used by factories or collectionfactories were not loaded when the parent collection was loaded, as they should be.
Instead, they were created and if necessary loaded synchronously when the factory created function was called.
This could result in serious hitches but above all was a bug.

With the fix, all resources are now loaded when the collection is loaded, as should be.
This does of course also have the side effect that more resources are potentially loaded when the collection is loaded. If this is not desirable you can exactly simulate the old behaviour by checking the “Dynamic Loading” option in the gameobject or collectionfactories and not do any factory load/unload.
This will have the effect that unloaded resources will be created (if not yet existing) when the factory create is called.

5 Likes