Defold 1.2.97 has been released

Defold 1.2.97

  • DEF-1129 - Added: Android Immersive mode option
  • DEF-2382 - Added: App/package resource bundling
  • DEF-2069 - Added: Added engine version to dev apps
  • DEF-2376 - Fixed: Support for nested hash()
  • DEF-2374 - Fixed: Auto completion for label module in editor
  • DEF-2128 - Fixed: Music interrupted on computed gain 0
  • DEF-2383 - Fixed: Collection time step was not affecting spine and model components
  • DEF-2459 - Fixed: Editor 1 failed to load texc library on Windows
  • DEF-2408 - Fixed: Documentation bug on window.set_listener()
  • DEF-2464 - Fixed: Models not correctly destroying bone GOs

Live Update

This release contains the first public version of the LiveUpdate feature. LiveUpdate allows you to ship a smaller bundle and load content dynamically. If you are unfamiliar with the feature there is a great post on the forums by Jakob that describes the feature very well: Live Updates

New API functions for LiveUpdate. The new API allows you to check if a collection proxy has all the resources it needs to load properly, and to store any missing resources that are needed in case they are missing. More complete documentation of the API will be available on the web page. In short:

  • collectionproxy.missing_resources takes an url to a collectionproxy and returns a table with hashes of all (if any) resources this collection is missing.
  • resource.store_resource takes a reference to the project manifest, the data to store, the hash of the data to store, and a completion callback. The user is free to acquire the resource data in any way they like (http, ftp, AWS and so on) before storing it.
  • resource.get_current_manifest gets a reference to the manifest currently in use. This reference should be passed on to resource.store_resource.

In the editor there are some new settings available.

  • There is a new checkbox on collectionproxy objects, ‘Exclude’. Check this and the collectionproxy resource, and all of its child resources, will not be included in the bundled archive but must instead be loaded using LiveUpdate!

  • Menu option Project->LiveUpdate settings… allows you to choose where to publish LiveUpdate resources.

  • When bundling your game there is a checkbox ‘Publish LiveUpdate content’. This will output all LiveUpdate resources to the target location selected in the settings.

Known issues
It wouldn’t really be a new feature without some known issues.

  • Collectionproxies that are children to excluded collectionproxies will themselves be implicitly excluded even
    though they are not tagged as such in the editor.

  • Addressing a collectionproxy with collectionproxy.missing_resources can only be done from a script that is in the same collection as the target collectionproxy. A workaround is to use messaging instead.

Native Extensions

This first release of the Native Extensions feature is a way for the users to get a very first taste of
how to extend the engine.

Note
Note that this release is a very first step, so not all features are there yet. Also note that while
polishing the product, we might need to make (possibly breaking) changes of this feature, in order to
further enhance the product. With that said, we’d like to invite you to try it out, and to help us test it!

What does it do?
This feature will allow the user to add new functionality that the engine doesn’t already have.
For example, adding new Lua modules, or interacting with native functionality in the OS, such as
Gyro, GPS, Ads, Window etc. using C++, Objective-C, Java and JavaScript.

What doesn’t it do?
The way to interact with the engine is limited by our SDK, which currently is very small.
Over time this SDK will grow, allowing the user to interact further with the engine.

More detailed info will be found in the Native Extension thread on our forum.
Also, more detailed documentation is on its way, along with more examples. Stay tuned!

Known Issues

  • Only supports OSX, iOS, and Android (C++) at this time
  • It currently only works if you download the latest Defold editor (not updating an older one) We are currently working on fixing this issue!

Documentation

  • Typographic changes to improve readability. In particular type info is much clearer.
  • All functions and properties has been updated with type information.
  • Callback function signatures now has explanations.
  • Lua standard libs and BitOp are now part of the docs (and editor completion!)
  • A large number of doc entries has been expanded and clarified.
  • A large number of examples has been added to doc entries.
  • Many reported errors have been fixed. Thanks, and keep the reports coming!

/The Defold team

24 Likes

Here’s a manual for native extensions with a simple example to get you going:

8 Likes

Hmm. In my game I turn off sounds by

sound.set_group_gain("sound", 0)

After update to 1.2.97 I receive many messages like:

ERROR:GAMESYS: A sound could not be played since the sound buffer is full (32). Message ‘play_sound’ sent from init:/sounds#sound_manager to game:/sounds#win.

And when I set (turn on sounds)

sound.set_group_gain("sound", 1)

All sounds play like unpaused in one moment.

How I should turn off sounds now? As I understand I should change my code and using some “on/off” flag? But how to be with music if I want to continue play in right place when user switch on music?

3 Likes

Hmm, perhaps @jakob.pogulis can help answer that?

Hmm… I started to write a message saying that I’m inclined to believe it’s just a stray error message, but then I read your post again… Do you mean that if you set_group_gain("master", 0) no more sounds are played, but when you reset the gain to 1 all the muted sounds will play at once?

yes,
and when I try to play sounds from group “master” with gain 0 - I receive an error (after some time)

ERROR:GAMESYS: A sound could not be played since the sound buffer is full (32). Message ‘play_sound’ sent from init:/sounds#sound_manager to game:/sounds#win.

like all sounds from zero-gain group paused on time 0.

1 Like

Yeah, I just confirmed the bug. Not sure how I could have missed this, we’ll look into it. @sofia.hedlund, we should probably make sure that we have sufficient regression test coverage of sound features.

4 Likes

When the extensions likely to be available for Windows, gents, any idea?

We will most likely work in the order of Java support for Android, then HTML5 and after that Windows and finally Linux. It’s hard to say for sure when, but Windows support should be available by the end of March (but please don’t hold me to this!). Do you have a specific extension in mind or are you mainly interested in playing around with extensions locally on your windows machine?

3 Likes

both @britzl, I want to see what can’t be done with extensions, and I’m interested in particular a dedicated spine animator in the editor in some form.

The extension system only allows you to extend the engine as of now. At some point you will also be able to create editor extensions, but that will be done using a different system.

aaagh ok, I’m going to ask when thats going to be available, but I think I already know the answer. :confounded:

2 Likes

Hello @AGulev!

I’ve verified the bug as mentioned above and we now have a fix for it. The next version of Defold is scheduled to be released on Monday, a beta should be available on Thursday (day after tomorrow).

5 Likes

When Native Extension support is added for HTML5 can the Native Extension code be its own JS file? Otherwise we lose the efficiency potential of globally hosted general engine version runtime files…

1 Like

The latest editor download for Mac is still 1.2.96 as far as I can tell. I’m having no success building the example plugin so far (after updating 1.2.96 -> 1.2.97 through the editor)–I just get an empty error on the first line of ext.manifest.

http://d.defold.com/stable/Defold-macosx.cocoa.x86_64.dmg
http://d.defold.com/stable/
?

Thanks, that should work. The download link from the dashboard (same as top link) still gets me 1.2.96 though (Windows is correct at 1.2.97)

EDIT: Jk that’s still 1.2.96–I thought there’d be an editor under the 1.2.97 release in that list, but the editor link for Mac is still 1.2.96 (have to dl + install to find that out.)

1 Like

Aha, it seems we are having some caching problems on d.defold.com where for some people the download links get redirected to older versions. Will look into this, for now the latest versions should be:

OSX: http://d.defold.com/archive/8e1d5f8a8a0e1734c9e873ec72b56bea53f25d87/stable/editor/Defold-macosx.cocoa.x86_64.zip
Win: http://d.defold.com/archive/8e1d5f8a8a0e1734c9e873ec72b56bea53f25d87/stable/editor/Defold-win32.win32.x86.zip
Linux (32bit): http://d.defold.com/archive/8e1d5f8a8a0e1734c9e873ec72b56bea53f25d87/stable/editor/Defold-linux.gtk.x86.zip
Linux (64bit): http://d.defold.com/archive/8e1d5f8a8a0e1734c9e873ec72b56bea53f25d87/stable/editor/Defold-linux.gtk.x86_64.zip

5 Likes

http://d.defold.com/stable/Defold-macosx.cocoa.x86_64.dmg?version=1.2.97

Does this kind of link fix cache issue for you?

3 Likes