Defold 1.2.178 has been released

This sprint we’ve focused a lot on stability, fixing multiple issues.

We’ve finally updated HTML5 to use Emscripten 2.0.11. This fixes the size issue of the js-web builds. It is also a bit smaller the the previous versions (see below).

Another notable addition is the go.get_parent([id]) which allows you to get the parent of a game object. This makes it more consistent with the gui functionality.

We’ve also updated the editor .css which makes it a lot easier to create a themed look.
Read more here

Inspection API (C++)

We’ve updated our internal inspection api to include component types and their internal nodes.
You can see an example of this if you visit your game’s web server at http://localhost:8002/scene_graph. It returns a .json file representing the currently loaded scene graph.

We have also added these functions to the dmSDK. See dmGameObject::TraverseGetRoot() for documentation, and extension-poco for an example

Defold SDK (dmSDK)

In order to support the new functionality of the extension-poco, we also needed to add a few more headers to dmSDK.

Removed support for Emscripten 1.38.12

We moved away from Emscripten 1.38.12 with Defold version 1.2.170. That version is now 6 months old, which is the time we’ve set to support older SDK’s. And to make room in our Docker container running the server, we have now finally removed it.

Instead we encourage you to update to the new Emscripten 2.0.11 version, which is also even smaller than before (percentage is reduction in size):

  • js-web: -~9%
  • wasm-web: -~12%

The numbers are a comparison between Defold 1.2.170 and 1.2.178.

Note that this only affects you if you use native extensions.

Engine

  • Issue-4897 - Updated: Html5: Update to Emscripten 2.0.11
  • Issue-5040 - Fixed: Custom resources can now be without suffix
  • Issue-5220 - Added: Added go.get_parent([id])
  • Issue-5289 - Fixed: Sound thread crash
  • Issue-5305 - Fixed: Bob: Crash fix: Treat the spine skins as an array if there is more than one skin
  • Issue-5336 - Fixed: macOS: Update app icon for macOS Big Sur
  • Issue-5358 - Fixed: Android: Fixed problem of recreating surface on certain Android devices
  • Issue-5366 - Fixed: Bob: Use a dummy ETag when generating the filename if one isn’t provided by the server
  • Issue-5368 - Fixed: Crash fix for easing curves (release before calling animation complete)
  • Issue-5375 - Fixed: Updated docs for angular_velocity to match implementation
  • Issue-5389 - Fixed: Fixed crash in liveupdate zip archive (Android/Windows)
  • Issue-5407 - Fixed: Add space between arguments generated from .script_apis
  • Issue-5409 - Fixed: iOS: Skip lipo step if there’s only one architecture
  • Issue-5418 - Fixed: iOS: Expose CFBundleVersion for iOS and macOS
  • Issue-5420 - Fixed: Fix for gui.get_node(), to ignore previously deleted nodes
  • Issue-5040 - Added: NE: Added profile inspection api
  • Issue-5364 - Added: NE: Added engine.h, hid.h, gameobject.h, math.h, vmath.h and to dmSdk
  • Issue-5425 - Fixed: NE: Updated to Xcode 12.1 package containing swift libraries

Editor

  • Issue-5321 - Fixed: Make editor only check for update once per hour
  • Issue-5325 - Fixed: Added a preference field for setting a custom keymap path
  • Issue-5397 - Fixed: Simplify editor styling by unifying color definitions and fonts
  • Issue-4941 - Added: Added options to move gui nodes via context menu
  • Issue-5417 - Fixed: Fixed editor signing procedure for windows
25 Likes

Looking forward to trying the new version. I see random native crashes in production, mostly from audio related code. Will be sure to report back if those crashes go away.

3 Likes

Android only?

Edit: I realised that you were referring to the size of those parts of the editor, not output.

To be clear:

Instead we encourage you to update to the new Emscripten 2.0.11 version, which is also even smaller than before:

js-web: ~9%
wasm-web: ~12%

The numbers are a comparison between Defold 1.2.170 and 1.2.178.

The 9% and 12% means the build size is reduced by 9% and 12%, not to 9% and 12%?

Additionally, what is the recommended way to update Defold on Linux?

Cheers,
Spen

1 Like

Yes

1 Like

I have the same issue, let’s hope it’s fixed!

The 9% and 12% means the build size is reduced by 9% and 12%

Yes, it’s the reduction of the sizes, not absolute values.

Although the numbers for 1.2.178 aren’t up yet, we continuously update them here: https://github.com/britzl/dmengine_size

what is the recommended way to update Defold on Linux?

We recommend using the “Update” button located either in the bottom right corner of the editor or on the “open project” selection popup when starting the editor.

3 Likes

Updated, thank you Mathias.

2 Likes

Can we get gameobject instance (for use in GetPosition(dmGameObject::HInstance instance) function) in this release?

Yes: https://defold.com/ref/stable/dmGameObject/

1 Like

I don’t see anything here that can help get dmGameObject :: HInstance for particular gameobject.

Ah, it may not have been added yet. @JCash?

Hey, cool! Any chance to take a look on that bug? This issue is what bothers me most of the time and is very critical to dev productivity:


Please, help if possible. I’m eager to provide any telemetry/logs/info/steps/OS settings.

P.S. Ubuntu mates, please help me to confirm that this nasty bug still persists in Defold Editor.

@dmitriy Is your use case from within a script function?

I think we can add dmGameObject::GetInstanceFromLua(L) with relatively little effort.

I had originally planned to expose it together with some other similar functions (that are much more hairy from a stable API point of view, so that’s why I had postponed it).

3 Likes

I want to do something like this in extension:

static int get_position_xy(lua_State *L) {
   dmGameObject::HInstance inst = function_to_get_instance_from_url(L, 1);
   Vectormath::Aos::Point3 const p = GetPosition(inst);
   lua_pushnumber(L, p.getX());
   lua_pushnumber(L, p.getY());
   return 2;
}

And in lua:

local x, y = get_position_xy(url)
1 Like

Ok. Yes, that’s part of the more complicated functions I need to think more about before releasing into the dmSDK. I.e. they need a cleanup to make sure they’re stable. My current ETA is early Q2.

3 Likes

I’ve had the 1.2.178 version of my game released for a few days now, and I’m not seeing any sound-related crashes so far.

How are your results?

4 Likes

Great news! We haven’t yet updated the game that had the issues. I’ll report back when/if we do!

2 Likes

Thank you very much @Mathias_Westerdahl.

IMHO it will be very useful if there is a way to pass a bulk of HInstances in a buffer from Lua to the extension method. So, the user can keep object lists/pools in Lua side and send their handles in bulk to the native extension. The extension can do its intensive calculations and using APIs like GetPosition/SetPosition to update all of these objects in the C side. That will save the crossing of the boundaries between Lua <> C for each of these objects. It will be just one call from Lua to C with a buffer(s) with all of the Hinstance handles and additional buffers with additional game specific data like (Color, is_alive, health, etc…).

I don’t know if there is a need be able to convert from a buffer of handles passed back from C extension to be looked up and converted to Lua objects table.