Defold 1.2.143 has been released

Defold 1.2.143

We’ve reworked how the refresh rate settings works. Instead of assuming a monitor refresh rate of 60Hz, we now query for the actual refresh rate at engine init. With this change, setting variable_dt in game.project is deprecated!
It is replaced by the Vsync checkbox and a Frame cap field. Projects using variable_dt will still function as before.
For more details see https://www.defold.com/manuals/project-settings/

This sprint we’ve also fixed a bunch of stability issues. Plus a big performance issue related to reading Json files using json.decode().
(Big thanks to the Family Age team for finding the issue!)

Also, we’ve improved a bit on our asynchronous loading of assets. This is something we’ll continue looking into as well, in order to ensure fast and smooth preloading of assets.

Engine

  • DEF-3262 - Added: Improved refresh rate settings.
  • DEF-3649 - Added: Added crash.SYSFIELD_MAX, crash.USERFIELD_MAX and crash crash.USERFIELD_SIZE fields.
  • DEF-192 - Fixed: Fixed postpone issue while tapping during boot on Android.
  • DEF-3645 - Fixed: Fixed crash when adding timers from within a timer callback.
  • DEF-3662 - Fixed: Fixed crash due to sprite.play_flipbook() sending ‘animation_done’ to deleted instances.
  • DEF-3653 - Fixed: Fixed null pointer in local Push notifications.
  • DEF-3656 - Fixed: Fixed rare crash in collectionfactory.create()
  • DEF-3661 - Fixed: Improved json parsing speedup
  • DEF-3631 - Fixed: HTML5 Fullscreen button not working on Android Chrome.
  • DEF-3635 - Fixed: Added preloader hints for gui, material and particles
  • DEF-3579 - Fixed: All default values for game.project are saved to game.projectc.

Editor

  • DEFEDIT-1434 - Added: Clickable resource links in Console
  • DEFEDIT-1493 - Added: Remember Search in Files dialog settings between sessions
  • DEFEDIT-1495 - Added: Remember Open Assets dialog settings between sessions
  • DEFEDIT-1488 - Fixed: Wrong field type for group in sound editor
  • DEFEDIT-1492 - Fixed: Report SSL errors more nicely
22 Likes

This is really cool (and a great step forward for Desktop games)!

What happens if the user has multiple monitors at different refresh rates and drags the window from one display to the other?

Yay! This means slightly faster level loading for Interrogation!

4 Likes

I’m not entirely sure, so I’ll refer to @Johan_Beck-Noren for some deep insights into this :slight_smile:

1 Like

We only query at engine init, so currently we won’t detect the case of dragging the window between different monitors. If you expect that scenario your best bet is to uncheck Vsync to let the engine use a variable timestep.

In the long run I think we want to measure real frame time in the engine and run the physics simulation on a fixed time step, which means we won’t have to deal directly with every combination of monitor setups. This release is a small step in that direction :slight_smile:

6 Likes

After this update, the Orthographic Camera has stopped working. I have created a forum post for this.

3 Likes

I am not sure that I understand what does it mean?

2 Likes

:heart_eyes:

5 Likes

When you do ”load” on a collection proxy or factory to load in the baclground it looks through what it need to load in advance.

These type of resources where omitted in some cases which would cause them to load syncronously in the main thread instead of in the background.

5 Likes

This seems to be broken in the html5 build? Testing via Project->Build html5 on Windows.

In the editor, the refresh rate is ok now on a 144Hz monitor, but when testing in html5 build, everything speeds up again (timers, animations etc).

If I uncheck vsync, then the speed is ok for both desktop and html5 builds.

1 Like

Looks like direct build to device (using engine.apk for debug version of the game) much slower than on 1.2.142 versions.

wow definitely a step forward, I might finally come back to game dev

1 Like

Did something change re dmengine restarting in this version?

In Windows with 1.2.143, pressing CTRL/B while dmengine is running no longer restarts dmengine.exe after building.

With 1.2.142 the build status bar shoots up then the status in the bottom left corner says “Rebooted local dmengine.exe” and the current instance of dmengine.exe restarts.

With 1.2.143 the build status bar shoots up then the status in the bottom left corner says “Ready”. The current instance of dmengine.exe carrys on regardless. I have to close the current dmengine.exe manually then CTRL/B again.

Thanks

Edit: 1.2.143 logs this info when pressing CTRL/B while dmengine is running. 1.2.142 does not log this:

2018-12-11 16:18:41.439 345882 [JavaFX Application Thread] WARN  editor.app-view - {:line 601}
java.nio.file.AccessDeniedException: D:\Projects\Defold\RGQ\build\x86_64-win32\dmengine.exe
	at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)
	at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
	at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
	at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269)
	at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)
	at java.nio.file.Files.delete(Files.java:1126)
	at editor.fs$fn__8585$fn__8590$fn__8591.invoke(fs.clj:148)
	at editor.fs$fn__8585$fn__8590.invoke(fs.clj:148)
	at editor.fs.proxy$java.nio.file.SimpleFileVisitor$ff19274a.visitFile(Unknown Source)
	at java.nio.file.Files.walkFileTree(Files.java:2670)
	at java.nio.file.Files.walkFileTree(Files.java:2742)
	at editor.fs$do_delete_directory_BANG_.invokeStatic(fs.clj:153)
	at editor.fs$delete_directory_BANG_.invokeStatic(fs.clj:166)
	at editor.engine.native_extensions$ensure_empty_unpack_dir_BANG_.invokeStatic(native_extensions.clj:254)
	at editor.engine.native_extensions$unpack_dmengine.invokeStatic(native_extensions.clj:276)
	at editor.engine.native_extensions$get_engine.invokeStatic(native_extensions.clj:315)
	at editor.engine$get_engine.invokeStatic(engine.clj:140)
	at editor.app_view$async_build_BANG_$fn__51813$fn__51817.invoke(app_view.clj:564)
	at editor.app_view$async_build_BANG_$fn__51813.invoke(app_view.clj:562)
	at clojure.core$binding_conveyor_fn$fn__4676.invoke(core.clj:1938)
	at clojure.lang.AFn.call(AFn.java:18)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

Having to manually close dmengine.exe before pressing CTRL/B was taking the fun out of using Defold. I’ve rolled back to 12.1.142.

Is anyone else experiencing this? I haven’t heard of any other reports of this problem. @Erik_Angelin and @mats.gisselson?

for me it’s working OK on 12.1.143

After a bit more testing. This is only happens when there’s a NE added to the project.

Create blank mobile game
Build - builds ok - runs ok
Build while running - builds ok - dmengine.exe reboots - runs ok

Add a NE (DefOS I tested)
Build - builds ok - “FETCHING ENGINE” message for a few seconds - runs ok
Build while running - builds ok - dmengine.exe does not reboot previous instance carries on running

I am reproducing this reliably:

Add NE, fetch libraries then it breaks. Remove NE fetch libraries and it fixes.

I have tried a couple of NE’s eg:

https://github.com/britzl/defold-lfs/archive/master.zip

When building a project with native extensions we try to delete the old engine before extracting the newly built custom engine. On windows you can’t delete the .exe of a running process, and that’s the error you’re seeing. As a workaround I guess you could manually close the running dmengine.
There seems to be a couple more issues around native extensions and launching/rebooting, we’ll discuss it in the team.

3 Likes

Thanks for the update Erik.

If this is the case how do you explain the following:

  • The issue was introduced in 1.2.143 (No previous versions exhibited this problem, and still don’t)

  • Defold is having no issues replacing with a newly built engine, I can see the engine being replaced in the build forder on first build after adding or removing extensions.

The problem is dmengine.exe does not reboot when you press CTRL/B on 1.2.143 only when a project contains a NE. Restarting defold makes no difference. Even when the engine is not replaced, the problem is still present.

Apologies for the counter argument. I don’t profess to know more than the Defold devs re this.

1 Like