Defold 1.8.0 Beta

Thank you for your help!. :+1:

This method works, do I have to apply this same method to all my examples to make them work on stable version 1.8.0? :thinking:

1 Like

you’re welcome, glad it’s working for you

it depends on the Defold team, as they consistently excel in adding new features and resolving issues :+1:

The latest beta contains a fix for Linux booting (i.e. no need to remove the profiler).
Please try this out and verify that it works for you.

1 Like

can confirm that linux :ok:
build ..a90334

2 Likes

I believe I have discovered a physics bug. I have attached a project that changes a collision’s size at runtime. The build time size is 2x2. I update to 128x128. The collision shape displays, but the logic seems to believe the size is still 2x2 in size. I have attached a video of what is happening. The box begins to dance around.

PhysicsTest.zip (4.6 MB)

I’ve been looking forward to the update to emscripten in this release and interested to see how it impacts HTML5 build size.

I built the same project on 3 different versions of Defold and took the results. Then I used third-party tools wasm-opt and terser to further reduce file sizes. I only tested WASM builds.

game.wasm binary

v1.7.0 v1.7.1 v1.8.0
Unmodified 2,074,983 bytes

2,084,984 bytes

2,086,129 bytes
wasm-opt 2,050,558 bytes 2,082,368 bytes 2,083,292 bytes

wasm-opt was run with these settings: --converge -O4 -O4 --gufa

There’s not much to observe about the wasm binary size. It’s pretty similar between versions, and even wasm-opt doesn’t change the size much. I’d say it’s about as optimized as it can get with current tools.

game_wasm.js

v1.7.0 v1.7.1 v1.8.0
Unmodified 270KB 240KB 340KB
minified by terser 207KB 185KB 198KB

Terser was run with these settings: { ecma: 2020, compress: { passes: 2 } }

The JS size regression between the unreleased 1.7.1 and 1.8.0 is likely due to two things:

  • Unlike in previous versions, the output of game_wasm.js is no longer minified. Most of the bloat is just unstripped whitespace and longer variable names.
  • Pull 8820 landed, re-adding polyfills for browsers that are about a decade old. (Firefox 34 was released on December 1, 2014)

Thanks to the devs who updated the emscripten version. I appreciate the work!

3 Likes

Thank you for this comparison.

I think it’s a bug. Thank you for highlighting it.

I compared versions with and without polyfills, and there was a ~10kb difference between builds (gzipped) before and after this PR. However, without this addition, the browsers where build worked fine using the old Emscripten (in 1.7.1) were broken in the new one.
We don’t want to break compatibility and add another “no-go” to the new version of Defold. Instead, we are considering adding custom options in the future (more likely for appmanifest) to be able to manually remove this support. You can follow the development on this issue here: Provide configurable option to control minimum suported browser versions · Issue #8774 · defold/defold · GitHub.

4 Likes

“I believe I have discovered a physics bug”

Does it work in 1.7.0 ?

I will give it a go and report back shortly.

Update: Happens in 1.7.0 See video

Ok, can you please create a ticket on GitHub and attach that test project?

Will do, thanks.

Thanks for comparison. I need more time to investigate possible solution because I can’t find any quick win for that. I’ve checked a couple of ideas. Nearest result was acquired when I added '--closure=1', '--closure-args=--compilation_level SIMPLE' to compiler input. But js output was still non-minified but had similar file size (around 270 Kb).
So fixes regarding these bug should be landed in the next release (I hope).

3 Likes

Looks like something changed in the editor version 1.8.0 to work billboard shader for sprites component

Perhaps vertex attributes are no longer taken into account. At the same time the same shader for paricles still works in the editor.
In runtime everything works fine as before.

1.8.0:

1.7.0: The sprite turned towards the camera.

We’ve committed a fix for the billboard rendering issue in the editor, and it will make it into the release. Thanks for reporting! :heart:

4 Likes

Unfortunately, this new feature is a bit unfinished - there is a chance that dmloader.js will run the engine twice and the page freezes and cannot even be reloaded (in Chrome browser).

How to reproduce it? Create an empty project, build an HTML5 build and just reload with the “F5” button many times.

5 Likes

Great catch! Thank you!!!

1 Like

solved in 1.8.0

3 Likes

Hello,

Could someone give me a straightforward answer how to make sprites face the camera? There is a bewildering amount of conflicting information. Just want them to always face the camera.

This is the wrong place to ask, but check out the latest posts from this thread:

2 Likes

My files created in previous versions work!

OS: Linux kernel 6.5.0
PG: Wayland
Version: Defold Engine 1.8.0 (fd3b8c6)

Thanks :partying_face:

2 Likes