Defold 1.3.5 BETA

Defold 1.3.5 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

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

Engine

NEW: (#5265) Added option to instantly clear spawned particles when stopping particlefx

Details

When particlefx.stop() is called all emitters immediately stop spawning new particles but already spawned particles will continue to live until they reach their end of life. Clearing/removing already spawned particles is only possible by either unloading the collection the particles belong to or by setting the tint alpha in the particlefx material to 0.0.

To give developers a better alternative to clearing spawned particles It is now possible to specify this when the particle effect is stopped:

particlefx.stop(url, { clear = true })
gui.stop_particlefx(node, { clear = true })

NEW: (#3232) New properties for nodes : enabled and visible

Details

New properties for GUI nodes: enabled and visible.

enabled is a property that toggles a node tree. This value was available in the runtime using gui.is_enabled() and gui.set_enabled() and now it’s avaliable from the editor as well.

visible is a property that toggles rendering for a node. This option may be useful when a node should be used for anchoring or as a click zone, but shouldn’t affect rendering at all. New methods added for work with the property: gui.get_visible() and gui.set_visible().


NEW: (#6628) Add support for drawing to multiple render targets

Details

Many graphical effects (e.g Many-light pipelines / deferred rendering, ssao, temporal antialiasing) operate on several components of a frame such as position, normals and albedo color. These are usually generated by drawing the scene once into several render targets that can be used in other parts of the rendering pipeline.

MRT is available from OpenGL 3 / ES3 / WebGL2 (and baseline vulkan) and support is now available in the Defold render.* API when creating a new render target:

function init(self)
    -- render target buffer parameters
    local color_params_rgba = { format = render.FORMAT_RGBA,
                                width = render.get_window_width(),
                                height = render.get_window_height(),
                                min_filter = render.FILTER_LINEAR,
                                mag_filter = render.FILTER_LINEAR,
                                u_wrap = render.WRAP_CLAMP_TO_EDGE,
                                v_wrap = render.WRAP_CLAMP_TO_EDGE }
    local color_params_float = { format = render.FORMAT_RG32F,
                           width = render.get_window_width(),
                           height = render.get_window_height(),
                           min_filter = render.FILTER_LINEAR,
                           mag_filter = render.FILTER_LINEAR,
                           u_wrap = render.WRAP_CLAMP_TO_EDGE,
                           v_wrap = render.WRAP_CLAMP_TO_EDGE }

    -- Create a render target with three color attachments
    -- Note: No depth buffer is attached here
    self.my_render_target = render.render_target({
           [render.BUFFER_COLOR0_BIT] = color_params_rgba,
           [render.BUFFER_COLOR1_BIT] = color_params_rgba,
           [render.BUFFER_COLOR2_BIT] = color_params_float, })
end

function update(self, dt)
    -- enable target so all drawing is done to it
    render.enable_render_target(self.my_render_target)
    -- draw a predicate to the render target
    render.draw(self.my_pred)
end

NEW: (#6488) Sign iOS app extensions while preserving entitlements

Details

An App Extension lets you extend custom functionality and content beyond your app and make it available to users while they’re interacting with other apps or the system. Examples are app specific stickers in iMessage or extensions to the sharing dialog.

App Extensions must be included in the PlugIns folder and they must be signed. It is easy to include extensions in a PlugIns folder by adding the PlugIns folder as a bundle resource to be included in the application bundle.

This change automatically signs any files in PlugIns with the .appex file extension when the application is bundled while at the same time preserving the app extension entitlements.


FIX: (#6767) Updated to LZ4 1.9.4 (63df16d)

Details

Updated internal LZ4 compression to 1.9.4. The update LZ4 implementation results in faster decompression compare to old versions.


FIX: (#5454) Migrate build system to python3

Details

The Defold build system has been migrated from Python 2 to Python 3.


FIX: (#6752) Generate Lua bytecode for HTML5 bundles

Details

Builds for the HTML5 platform uses standard Lua 5.1.5 (while LuaJIT is used on all other platforms) and the Lua script files are included in the game archive as uncompiled text instead of bytecode. With this change the HTML5 platform also use bytecode (generated using the Lua 5.1.5 luac tool).


FIX: (#6757) Added collectionproxy.get_resources()

Details

Returns a list of all the resources that the collection proxy is dependent on:

   local resources = collectionproxy.get_resources(proxy_url)
   for _, v in ipairs(resources) do
       print("Resource: " .. v)
    end

This functionality will later be used for removing old live update content from disk.


FIX: (#6766) Make sure game.arcd isn’t compressed in apk/aab

Details

Keep the main resource archive game.arcd in the Android bundle uncompressed to prevent unnecessary memory allocations in runtime.


FIX: (#6742) Exclude unnecessary information from html build report.

Details

Exclude game.project information and build options related to authorisation from the generated build report.


FIX: #6788 GUI text doesn’t render if render script has previously early-outed

Details

This fixes an issue with text not always rendering when skipping a frame, for instance during an early out in the render script.


FIX: #6816 Fix issue when engine can’t play more than 32 sounds simultaneously

Details

Use sound.max_sound_instances as maximum count of simultaneously played sounds.


Editor

NEW: (#6269) Read authentication token for dependencies from system environment

Details

When using project dependencies hosted in private repositories on GitHub or behind basic authentication on a private server the authentication token has to be part of the userinfo portion of the URL:

https://user:password@github.com/defold/defold/archive/refs/heads/dev.zip

This is not recommended as it may result in developers accidentally leaking their access token when sharing a list of their dependencies in a support ticket or in the Defold forum.

To avoid this it is now also possible to store the authentication token in a system environment variable and let Defold read this when resolving dependencies. Defold will inspect the dependency URLs and replace any userinfo password field starting and ending with __ (two underscore characters) with the value from the system variable specified by the string enclosed within the __ prefix and suffix:

https://user:__MY_GITHUB_TOKEN__@github.com/defold/defold/archive/refs/heads/dev.zip

In the above URL the __MY_GITHUB_TOKEN__ will be replaced by the value of the system variable MY_GITHUB_TOKEN.


FIX: (#6666) Ignore empty lines in .defignore

Details

FIX: (#6400) Report defignored files as non-existent

Details

Additionally, this changeset makes the editor sync resources after save if .defignore file was modified.


FIX: (#6753) Improve editor behavior with legacy Spine projects

Details

User-facing changes

  • Prevent legacy Spine projects from corrupting Gui scenes with Spine data unless extension-spine has been added as a dependency.
  • Improve error message if a Collection, Game Object, or Gui contains embedded data that is not understood by the editor. The message now includes a common-cause solution (e.g. “Could the project be missing a required extension?”).

FIX: (#6732) [DEFEDIT] Safeguard against IOExceptions when generating convex hulls

Details

User-facing changes

  • IOExceptions were not being caught correctly for image reads associated with .atlas and .tilesource files.
  • Removed unnecessary image reads when Sprite Trimming is disabled.

CHANGE: (#6760) Redesign game.project form #6760

Details

This changeset alters the UI of forms that requested navigation (currently only game.project form) in a following way:

  • the form shows sections UI organized in groups;
  • the form shows at most one section at a time.

29 Likes

Woo hoo, thank you!

3 Likes

We have included another fix into this release:

FIX: #6788 GUI text doesn’t render if render script has previously early-outed

5 Likes

WOW! Awesome release. Thank you everyone involved.

It’s also great to see editor attention :smiley:

2 Likes

Indeed. There are also a bunch of performance improvements made to the editor these last couple of weeks. Especially noticeable if you make a lot of external changes to files and go back to the editor. Also in the Asset list.

Oh, and I see now that we do not mention the new game.project view. I’ll update release notes.

5 Likes

One more fix included:

FIX : #6816 Fix issue when engine can’t play more than 32 sounds simultaneously

7 Likes

Trying to test MRT and haven’t found anywhere how to set up one of the render targets as a texture.
This is how i initialise the MRT:

local function rt_params(format, width, height, filtering)
	return {
		format     = format,
		width      = width,
		height     = height,
		min_filter = filtering,
		mag_filter = filtering,
		u_wrap     = render.WRAP_CLAMP_TO_EDGE,
		v_wrap     = render.WRAP_CLAMP_TO_EDGE
	}
end

local function create_mrt(w, h)
	local rgba32_params = rt_params(render.FORMAT_RGBA, w, h, render.FILTER_LINEAR)
	local r32f_params   = rt_params(render.FORMAT_R32F, w, h, render.FILTER_NEAREST)
	local depth_params  = rt_params(render.FORMAT_DEPTH, w, h, render.FILTER_NEAREST)
	local multi_render_target = {
		[render.BUFFER_COLOR0_BIT] = rgba32_params, -- color
		[render.BUFFER_COLOR1_BIT] = rgba32_params, -- normals
		[render.BUFFER_COLOR2_BIT] = r32f_params,   -- depth from view ray
		[render.BUFFER_DEPTH_BIT]  = depth_params
	}
	return render.render_target("MRT", multi_render_target)
end

What to do next?
How do I pass a separate render-target as a texture?
Obviously using render.enable_texture(), but what to pass there?

1 Like

I’m not the best to answer this since I haven’t had time to play with it but I think it should be set with render.set_render_target() :thinking:

no no, I don’t mean set for rendering, but set as a texture to read in another render-pass.

2 Likes

Ah, ofc.
I’ll ping @jhonny.goransson and let him give the details.

I think something like that:

render.enable_texture( 1, self.multi_render_target, render.BUFFER_COLOR1_BIT )
1 Like

Yep, it’s how it should be used. We might want to clarify that in the docs if it’s not already stated. Thanks for testing it out!

2 Likes

I noticed that. Neat!

3 Likes

Amazingly convenient and visually great! :heart_eyes:

3 Likes

But for the new properties for nodes, please tidy up the order :smiley:
image

Size Mode above Enabled (because it is very related to Size) :wink:

4 Likes

Fixed.
Build is in progress

4 Likes

:heart:
I’m saving this screenshot to my proofs of why Defold Team is amazing (8 min!):

10 Likes

Unbelivable - this is MRT! :slight_smile:

19 Likes

Cool! :slight_smile:

5 Likes

Was waiting to see it in action and here it is! Amazing! :heart_eyes: It is a great feature and Defold is now way more attractive to devs!

5 Likes