Defold 1.2.141 has been released


#1

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.

#2

#3

Woow. This is a great new :tada:

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


#4

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

What are the changes to this?


#5

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

#6

I’m very happy about this.


#7

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)


#8

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.


#9
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.


#10

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.


#11

Can you post the console output?


#12

Unsure what output to post here. See yourself:


#13

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.


#14

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


#15

Hmm, will check tomorrow.


#16

Wow, webassembly and dynamic libs!


#17

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


#18

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.


#19

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?


#20