Defold 1.2.141 has been released

Defold 1.2.141

This release adds support for WebAssembly. Bundling for HTML5 will now output both WebAssembly and the older AsmJS version of the engine. Depending on browser support the appropriate version will automatically be selected and loaded at runtime. In most cases this new version can decrease initial load time for HTML5 games.

Engine

  • DEF-3540 - Added: New WebAssembly platform (bundled together with Asmjs on HTML5).
  • DEF-3582 - Added: Support for dynamicLibs in the platform context in NE config files.
  • DEF-3565 - Fixed: Boot crash on iOS 6.
  • DEF-3523 - Fixed: NE error log parsing for malformed Defold SDKs.
  • DEF-3568 - Fixed: Release audio focus before closing down platform sound.
  • DEF-3574 - Fixed: Internal GUI node optimizations.
  • DEF-3433 - Fixed: Improvements to pprint.

Editor

  • DEFEDIT-1474 - Fixed: GUI box node using tile source anim as texture did not respect h/v flip.
20 Likes

Woow. This is a great new :tada:

Thrilled :slight_smile: Can we use dynamicLibs for platforms now? More info please :slight_smile:

2 Likes

This means no clicking / garbage audio when closing apps with audio playing now?

What are the changes to this?

2 Likes

I think these are the fixes:

  • pprint should warn that the output was truncated
  • support multiple arguments
  • Print length increased to just below 4Kb of characters
7 Likes

I’m very happy about this.

4 Likes

This is a compiler directive for native extensions, to use “-Wl,dynamic” for certain libraries.
(I needed it for a test with using jnigraphics for Android)

5 Likes

pprint is now also a bit more clever regarding nested tables, it will not try to recurse in to a table that it has already printed.

7 Likes
local test = 5
pprint(test)

…results in (null),

Is this the way it was before? I could swear pprint-ing non-table variables just printed their contents before the update.

The html5 build of my project doesn’t run anymore after update. Just black screen after loading. There is a bunch of errors in javascript console, but I know nothing about javascript and webgl. Nothing changed from previous engine version.

1 Like

Can you post the console output?

Unsure what output to post here. See yourself:

It said “missing function: FMODBridge_init”, so I guess that’s related.
I’m guessing it’s because the FMOD extension doesn’t yet have support for the new wasm-web platform. And, currently you get both js-web and wasm-web when you bundle for HTML5.

As a workaround, you should be able to remove the dmengine.wasm, and the game should fallback to the dmengine.js file instead.

EDIT: Perhaps @sven can post some pointers on how to build the wasm libraries the way we do tomorrow.

1 Like

I believe there is adresses to all the tables as well (or was it there before?) Anyhow. Nice additions

2 Likes

Hmm, will check tomorrow.

2 Likes

Wow, webassembly and dynamic libs!

1 Like

What does extension developers have to do to get their HTML5 extensions to work with webassembly?

1 Like

For each platform, if you need a static library, you need to make sure it’s compiled for that platform too. So, where you previously used emscripten to compile a library for js-web, you need to use Emscripten again (1.38.xx) to compile with some extra flags. It might be possible to copy the library from js-web to wasm-web. I cannot guarantee it’ll work, and it will probably be suboptimal, since we compikle our wasm-web target with certain flags to make the entire build as performant as possible.

Hi! I don’t have access to the source code of FMOD, so the only thing that I can do is pass the LLVM bytecode that they provide (which is not even built with the same version of emscripten Defold uses, but works with some monkey patching) through em-ar and get an .a, so I don’t have access to the compilation flags. Are there any webasm-specific flags you know of that I should pass to em-ar, or should the same library theoretically work?

3 Likes