Defold 1.6.0 BETA

Defold 1.6.0 BETA

The latest beta is now released, and we invite those interested in beta testing the new features in the editor and engine to join now.

The beta period will be 2 weeks and the next planned stable release is two weeks from now.

Please report any engine issues in this thread or in issues using Help → Report Issue

ATTENTION: This release contains breaking changes!

Please pay extra attention to the release notes and the three breaking changes, as one or more of them may affect your projects. The breaking changes (listed in more detail further down) are:

  • 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

Disclaimer

This is a BETA release, and it might have issues that could potentially be disruptive for you and your teams workflow. Use with caution. Use of source control for your projects is strongly recommended.

Access to the beta

Download the editor or bob.jar from Releases · defold/defold · GitHub

Set your build server to https://build-stage.defold.com

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.projectgui.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.
25 Likes

For those using the Spine extension, there is an updated version that supports Defold 1.6.0+:

Also note that while we list these breaking changes, we also don’t expect any user to actually have to make any changes to their project.

8 Likes

So I can use depth render target for shadow? How?

1)Add here depth flag?

  1. In shader I will have empty main?

3)When look at shadow texture. How to get depth?

Also if I do not write any data to color part, I need to create it? Or only depth is enough?

1 Like

Yes it worked)
1)So i can remove BUFFER_COLOR_BIT.
2)Also i do not need to change shader. No color bit no fp shader?
3)Need to remove transient ?

draw_shadow = { transient = { render.BUFFER_DEPTH_BIT }  },
1 Like

@jhonny.goransson
Shadow worked on pc, not worked in html5

3 Likes

Another great release! Thanks for this.
Looking at some of the recent announcements it is even more impressive what you guys push each release.

7 Likes

Thank you JCash!

sys.exists will sure make my life easier! I’ve been scratching my head on a good way to do it for a while now

to say I am excited to replace the contents of this dumpster fire with a single function call is an understatement, THANK YOU 1.6, and thank you JCash for being the one to implement it!
just for the sake of code gore, here’s my current fs.exists() function (it requires attempting to load the entire file)

function M.exists(path, global_scoped)--TEMPORARY!!! REMOVE THIS WHEN UPDATED TO 1.6
local success = true
local __try_filename = M.get_path(path, global_scoped)
	local __try_filedata = nil
	local function __try_load()
		local f, err = io.open(__try_filename, "r")
		if not err == nil then if noErr == nil or noErr == false then error(err) end return false end
		if err then return false end
		__try_filedata = f:read(config.BYTE_LIMIT/8)
	end
	__try_load()
	if __try_filedata then
		return __try_filedata
	else
		success = false
	end
	local f = success
	if f == false or f == nil then return false else return true end
end
2 Likes

Thanks for another great release! I think it would be a good idea to add release notes to the Releases page on Github. You could link to that forum or create a separate Changelog file in the Github repository that would duplicate the release notes from the forum. This is how Godot does it, for example. This would be convenient for those who watch releases mainly on Github.

5 Likes

I agree.
We are continuously improving on how we generate our release notes, and the plan is to add them where needed, e.g. the in editor before one updates to a new version.
Having the release notes available in the release shouldn’t be too difficult either.

5 Likes

Found a small bug in this version. Thanks @jhonny.goransson for the help tracking this down.

Font shadows seem to be broken for the mac build. Html5 working as expected. Not sure about other platforms. Outline also working as expected.

Editor


Html5

Mac

Version 1.5.0 stable also working.

3 Likes

Found the issue, a fix will be with you shortly.

7 Likes

We also just updated the Beta with an audio fix for HTML5.
We previously used a deprecated api to play sounds, but now we instead use Emscriptens own OpenAL library.

5 Likes

Updated this demo with 1.6.0 beta.

Also enabled frustum_planes = render.FRUSTUM_PLANES_ALL. As far as I can figure out from the profiler, enabling this option has a positive effect on the number of vertices involved in the calculations. Very good, especially for the calculation of shadows.

11 Likes

Nice! Have you posted this on Twix?

Not sure if it belongs here or in the other thread concerning the new mac m1 build, but opening a second IDE causes big problems after a short period of time, making it impossible to use. For me personally this is huge, because I need to have several projects open to learn from them.
I think this is a known issue, but somehow remains unnoticed.
The second opened Defold window becomes unresponsive after a certain amount of time #7939

@vlaaad is looking into it at this moment actually.

3 Likes

Just updated the latest beta (still showing as 1.6.0) and some icons in the edit menu look corrupted. They start visualizing ok if you switch to another application and then back.
Not sure if this is also in the stable release, I only use the beta :stuck_out_tongue:

I’m on M1 Macbook Pro with OSX 13.5

That is the latest beta, yes.
After the release, we don’t generally update the beta itself.

This issue is likely in the release as well, then. Please create a ticket for it!

2 Likes