Defold 1.6.0 has been released

Defold 1.6.0

Release notes

Summary

  • BREAKING CHANGE: (#7967) Added option frustum_planes to render.draw()
  • BREAKING CHANGE: (#7971) Renamed dmSpinlock::Init() to Create() and also added Destroy() function
  • BREAKING CHANGE: (#7972) Remove embedded builtins resources from release builds
  • NEW: (#7866) Custom vertex format support for ParticleFX components
  • NEW: (#7961) Added sys.exists() for verifying the existence of a file or directory
  • NEW: (#7936) Automatically build SPIR-V shaders when using the Vulkan backend
  • NEW: (#7868) Show notifications about fetch library issues
  • NEW: (#7890) Add filtering to the editor Console
  • NEW: (#7854) Add gui.max_animation_count propertin in game.project
  • NEW: (#7914) Make editor load natives only for its platform
  • FIX: (#7949) Fix issue when window (on Mac) opens without focus
  • FIX: (#7681) Create depth / stencil buffers as textures for render targets
  • FIX: (#7928) Fixed a fullscreen issue for newer macOS versions
  • FIX: (#7921) Add ability to ignore bundling for native extensions in .defignore
  • FIX: (#7851) Delete sound instance if stopped before play issued
  • FIX: (#7827) Fixed non-Western character input not working on Windows and MacOS.
  • FIX: (#7969) Fix using state name as a temp resource name during the build process
  • FIX: (#7987) Make sure that all the excluded collection detected even using local cache
  • FIX: (#7983) Use EngineLoader.wasm_size if response doesn’t have Content-Length header
  • FIX: (#7985) Fix for calling Unmount when removing a live update archive
  • FIX: (#7950) Show right error when bundling
  • FIX: (#7887) Separate glyph data from fonts
  • FIX: (#7934) Less aggressive rounding of numeric values in the editor
  • FIX: (#7904) Make .image-view styling more efficient
  • FIX: (#144) Fix spine related crash in the editor when loading many spine animations at the same time
  • FIX: (#7908) Property editor fixes
  • FIX: (#7938) Make adb devices parsing more resilient
  • FIX: (#7958) Send correct Content-Length HTTP headers in responses to engine HEAD resource requests
  • FIX: (#8003) Updated our sound backend library for HTML5

Engine

BREAKING CHANGE: (#7967) Added option frustum_planes to render.draw()
The flag is set as render.FRUSTUM_PLANES_SIDES as default, making sure only the 4 side planes of the frustum is used.
By specifying frustum_planes = render.FRUSTUM_PLANES_ALL, the user can make sure all 6 frustum planes are used.

Example:

render.draw(self.model_pred, { frustum = proj * view, frustum_planes = render.FRUSTUM_PLANES_ALL})

BREAKING CHANGE: (#7971) Renamed dmSpinlock::Init() to Create() and also added Destroy() function
On some platforms, the spinlock needs to also be properly destroyed.
To make this more apparent, and also have good naming, we renamed the functions to Create()/Destroy().

BREAKING CHANGE: (#7972) Remove embedded builtins resources from release builds
We’ve removed the system debug font as a default gui font. This will save some size in the final executable. This is a breaking change but it is likely to affect only a few users. If you are using gui text, and your gui scene doesn’t have a font, the text will not show. If that is the case, then the fix is to add a font explicitly to your gui scene.

NEW: (#7866) Custom vertex format support for ParticleFX components
Particle FX nodes can now utilise the custom vertex formats previously added to sprites. This enables you to pass custom data from the editor into shader attributes when rendering particles.

NEW: (#7961) Added sys.exists() for verifying the existence of a file or directory
With this function it is possible for the user to check if a file exists before trying to load the file.

FIX: (#7949) Fix issue when window (on Mac) opens without focus
Fixed an issue when a window on Mac opens without focus. In such cases, the window doesn’t react to most input events, and only double-click works.

FIX: (#7681) Create depth / stencil buffers as textures for render targets
Added support for creating render targets with depth buffers as textures, which enables you do bind them to a shader like a regular texture without the need to write the depth data to the color texture. To create a rendertarget with a depth texture, pass in the render.TEXTURE_BIT flag in the depth buffer parameters.

-- Creating the RT in a render script:
local color_params = {
    format = render.FORMAT_RGBA,
    width  = render.get_window_width(),
    height = render.get_window_height(),
}
local depth_params = {
    format = render.FORMAT_DEPTH,
    width  = render.get_window_width(),
    height = render.get_window_height(),
    flags  = render.TEXTURE_BIT -- this will create the depth buffer as a texture
}

self.my_render_target = render.render_target({
      [render.BUFFER_COLOR_BIT] = color_params,
      [render.BUFFER_DEPTH_BIT] = depth_params
  })

-- bind / enable the depth texture to a texture slot on a material:
render.enable_texture(0, self.my_render_target, render.BUFFER_DEPTH_BIT)

FIX: (#7928) Fixed a fullscreen issue for newer macOS versions
The issue was that on macOS Ventura, the fullscreen mode would not render anything as it got a window size of (0, 0).
We now detect this case and then use the window frame rectangle.

FIX: (#7921) __Add ability to ignore bundling for native extensions in .defignore __
Added ability to use .defignore to ignore native extensions when bundle in bob.jar.

FIX: (#7851) Delete sound instance if stopped before play issued
Fixed an issue where a delayed sound was stopped before it started playing.

FIX: (#7827) Fixed non-Western character input not working on Windows and MacOS.
It is now possible to input Chinese, Korean and other non-western language characters using a keyboard on Windows and macOS. The action table of the on_input() text event will contain the pressed key, just like for Western keyboard input.

FIX: (#7969) Fix using state name as a temp resource name during the build process
Fixed issue when bob.jar creates state file for its internal data. It makes it impossible to use this word as a name for a folder in the project.

FIX: (#7987) Make sure that all the excluded collection detected even using local cache
Fixed issue when using local cache may affect detection of the excluded collection proxies for LiveUpdate.

FIX: (#7983) Use EngineLoader.wasm_size if response doesn’t have Content-Length header
dmloader.js will use EngineLoader.wasm_size if response doesn’t have Content-Length header in setupWasmStreamAsync.

FIX: (#7985) Fix for calling Unmount when removing a live update archive
This fixes an issue where the memory and file handles of a live update archive would linger until the next reboot.

Editor

NEW: (#7936) Automatically build SPIR-V shaders when using the Vulkan backend
Improved the flow for using the Vulkan graphics backend in the engine:

  • Bob will generate spir-v shaders automatically when a project is using an appmanifest file with vulkan link flags
  • The editor will always generate spir-v shaders now in order to catch potential errors and pitfalls early
  • The “output_spirv” project flag has now been deprecated, but not fully removed yet, so old projects will continue to work regardless

NEW: (#7868) Show notifications about fetch library issues
The editor will now show notifications about failed attempts to fetch libraries.

NEW: (#7890) Add filtering to the editor Console
This changeset adds a Filter function to the editor console. The editor supports 2 types of filters:

  • inclusive filters, e.g. only show lines with text “my-app-subsystem” with my-app-subsystem filter
  • exclusive filters, e.g. exclude lines with text “chatty-subsystem” with !chatty-subsystem filter

Additionally, you can use multiple filters simultaneously.

NEW: (#7854) Add gui.max_animation_count propertin in game.project
Now it’s possible to specify count of animations in GUI component in gam.project → gui.max_animation_count (by default 1024).

NEW: (#7914) Make editor load natives only for its platform

FIX: (#7950) Show right error when bundling
Show right bundle error instead of game/build/default/game.arci (No such file or directory)

FIX: (#7887) Separate glyph data from fonts
Improved the font resource memory footprint by separating glyph data from common font settings such as material and shadow parameters that are generally not needed for the glyph data. Building a font file will not result in two resources on disk, one ‘.fontc’ and one ‘.glyph_bankc’ respectively. The glyph bank may be shared between two or more font files depending on font settings.

FIX: (#7934) Less aggressive rounding of numeric values in the editor

  • Less aggressive rounding of numeric values in the editor.

FIX: (#7904) Make .image-view styling more efficient
Improve editor performance when scrolling the Assets pane

FIX: (#144) Fix spine related crash in the editor when loading many spine animations at the same time
This fixes an occasional editor crash when using the Spine extension.

FIX: (#7908) Property editor fixes

  • Fixed some situations where the Property Editor would take longer to redraw after editing a property.
  • Fixed a situation where a property could be reverted to its previous value shortly after an edit.
  • Fixed a situation where duplicate undo steps could be created after committing a property change with the Enter key.

FIX: (#7938) Make adb devices parsing more resilient
APK installation on Android is now more resilient to different formats of adb devices output.

FIX: (#7958) Send correct Content-Length HTTP headers in responses to engine HEAD resource requests

  • Fixed an issue where rebuilding the game project with the game already running would shut down the game with an error message.
23 Likes

Add render.TEXTURE_BIT to shadows in my game.
It worked in pc build but not worked in web build.(FIXED)

 TEXTURE_2D at unit 1 is incomplete: Minification or magnification filtering is not NEAREST or NEAREST_MIPMAP_NEAREST, and the texture's format is not "texture-filterable".

Problems was with materials. In material i set filter to linear

Changed SHADOW_TEXTURE filter to nearest fixed it. So be careful

Can it be fixed? With linear shadows looks better
2023-09-25_16-37-52
2023-09-25_16-38-39

Am getting some crazy glitches since updating (Windows)

Hm, It’s a WebGL issue. Not all formats are “texture-filterable” according to the spec: https://registry.khronos.org/OpenGL/specs/es/3.0/es_spec_3.0.pdf (search for texture-filterable and you’ll get a table). You can always filter manually in your shader

1 Like

Ouch, could you test without particles? I’m not sure why that would happen otherwise :thinking:

:frowning:
Thanks, for answer. For now i will return to BUFFER_COLOR_BIT.
I have no idea how to manually filter in shader, and how is it impact on performance:) Mb make some experiments sometime later)

You’re right - no glitches when particles are not drawn.

1 Like

Alright great, that’s a good lead I think. I’ll investigate this, let me know if you manage to find a 100% repro case. Right now it’s a bit tricky to get a frame capture of the issue :slight_smile:

1 Like

tried this (╯▽╰ )

8 Likes

So it seems like there is an issue with particle fx in 1.6.0 which we didn’t catch in our own tests or anyone here noticed during the beta (everyone is helping out testing the betas right?).

We will give this full priority tomorrow and hopefully be able to push a hotfix.

8 Likes

Again, great update and new changes

3 Likes

I think I have a fix for this issue, here’s a build if you want to give it a go: https://d.defold.com/archive/dev/b54106baeaa5b0e4ab45c90c9714cece84ab644b/dev/editor2/Defold-x86_64-win32.zip

5 Likes

Fix looks good! Thanks Jhonny :+1:

6 Likes

Defold IDE on Mac M1 is still freezing after a short while, when another IDE is opened.
I thought somebody had been working on this already…?

Not yet no. But it’s on our horizon.

We have released a hotfix for this now, please update your editor and sorry for the issue!

Oh, so no never reached although it seems so near?

I have had a similar issue.
After the last update was fixed.

3 Likes
sys.reboot()

Doesn’t work in HTML5. It hangs the browser.

I just clearing save data and then reboot the game on the button click.

A lot of these errors
image

p. s. Checked on 1.5 everything fine.

1 Like