Defold 1.9.1 BETA

Defold 1.9.1 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.

We hope this new workflow will highlight any issues earlier, and also get valuable feedback from our users. And please comment if you come up with ideas on improving on this new workflow.

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

Thx for helping out!

Disclaimerx

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 http://d.defold.com/beta/

Summary

  • BREAKING CHANGE: (#7261) Improve the time it takes to save soon after opening the editor
  • NEW: (#9109) Add initial version of C# support to dmSDK
  • NEW: (#9099) Add an adjustable limit for dynamic GUI textures
  • NEW: (#9057) Add attachment texture resource path into resource.get_render_target_info
  • NEW: (#9130) Add new function tilemap.get_tile_info()
  • NEW: (#9138) Add tilemap.get_tiles() function
  • NEW: (#9069) Get and set material constants in GUI scripts via gui.get/gui.set
  • NEW: (#9081) Overhauled editor save system
  • NEW: (#9091) Tile Source editor: “Collision groups” text color in the outline now corresponds to the tile collision color
  • NEW: (#9101) Add validation for URL symbols ‘:’ and ‘#’
  • NEW: (#9133) Add icons to properties fields to differentiate URL/hash/number
  • NEW: (#9140) Editor: Default to internal code editor for .appmanifest files
  • NEW: (#9144) Editor: Support viewing library resources in Custom Code Editor
  • NEW: (#9162) Use code view when opening resources as text
  • NEW: (#9171) Added the ability for tables to change their width in form view to improve material editing
  • NEW: (#9174) Add possibility to delete, cut and move selected tiles in tilemap
  • FIX: (#9077) Fixed the issue where the tilemap wasn’t updated after a new tilesource was set
  • FIX: (#8995) Fixed black screen on iOS launch
  • FIX: (#9086) Fixed issue where all the tilemaps used only one material.
  • FIX: (#9098) Accept nil instead of a play properties table for model.play_anim()
  • FIX: (#9110) Fix issue that makes it impossible to use tilemap.set_tile() with physics on tiles with indexes greater than 2^16.
  • FIX: (#9163) Fix for collection factory script instances having separate property sets
  • FIX: (#9164) Fix the issue where the window becomes invisible after a restart.
  • FIX: (#9156) Fix bug when Display->Fullscreen has no effect
  • FIX: (#9157) Fix the bug where it’s possible to select the HTML5 game canvas even if it’s not stretched.
  • FIX: (#9159) Fix where a hash can be used as a regular string during concatenation in debug
  • FIX: (#9158) Fix issue where HTML5 build reports Unknown instead of compilation shader errors
  • FIX: (#9176) Fix various issues related to Gui size overrides in the editor
  • FIX: (#9116) Fix the last column size for the table view in the Editor.
  • FIX: (#9139) Editor: Fix load crash resulting from missing Gui template resource
  • FIX: (#9154) Use Gradle as the build system for Bob.jar
  • FIX: (#9186) Only trigger mouse wheel up/down events if they’re in the correct direction
  • FIX: (#9141) Add Enter/Esc controls for properties in the editor
  • FIX: (# 9189) Fix issue when the first single value input into a property field right after the property reset may be lost
  • FIX: (#9197) Fixed tilemap brush visibility
  • FIX: (#452) Update camera manual to showcase the new camera scripting API
  • FIX: (#65) Updated to Play Billing 6.0.0
  • FIX: (#44) Added support for app open ads for AdMob
  • FIX: (#167) Update to spine-c 4.2

Engine

NEW: (#9099) Add an adjustable limit for dynamic GUI textures
GUI components can now adjust the maximum number of dynamic textures that can be created in runtime.

NEW: (#9109) Add initial version of C# support to dmSDK

(technical preview)

Note: Currently, DotNet 9 preview only supports macOS, but as more issues are resolved on their end, we’ll integrate them into our pipeline.

This adds a first version of C# support in dmSDK (our sdk for the Defold native extensions).

It adds support for creating a native extension, with apis:

  • namespace dmSDK.Dlib
    • class Hash
    • class ConfigFile
  • namespace dmSDK.Extension
    • class Extension
  • namespace dmSDK.Lua
    • class Lua
    • class LuaL

Example extension source code (WIP): encoder.cs
We’ll continue cleaning up this example (and rename it).

Like with C/C++ code, the required step is to add one or more .cs files to your folder.
A .csproj file will be automatically generated, and the output will be generated as a NativeAOT static library for the current platform.
This allows you to register an extension to the engine and get the same callbacks for the life cycle functions as with a regular native extension.

You can read more about the features and limitations of NativeAOT support here: https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot

Note: We added a small faq regarding our C# support here

NEW: (#9057) Add attachment texture resource path into resource.get_render_target_info
Added a new texture field in the data returned from resource.get_render_target_info:

local rt_info = resource.get_render_target_info("/my_rt.render_targetc")
local t_info = resource.get_texture_info(rt_info.attachments[1].texture)

This can then be be used to change the backing texture of an atlas, which should make it easier to achieve custom rendering for any type that is using atlases:

go.property("rt_atlas", resource.atlas())
go.property("rt", resource.render_target())

local function render_target_to_atlas(self)
	-- get the render target info. This contains all the attachment texture resources
	local rt_info = resource.get_render_target_info(self.rt)
	-- get the atlas info, we can create this from scratch, but it's easier
	-- to use the data that is already there and then just modify it
	local atlas_info = resource.get_atlas(self.rt_atlas)
	-- update the atlas backing texture to use our render target attachment
	atlas_info.texture = rt_info.attachments[1].texture
	-- set / update the atlas with the new atlas info
	resource.set_atlas(self.rt_atlas, atlas_info)
end

Scripts can now also pick up render targets as script properties as well:
go.property("my_rt", resource.render_target())

NEW: (#9130) Add new function tilemap.get_tile_info()
Added a new function tilemap.get_tile_info() which provides full information about the tile at the specified layer and coordinates.

  -- get the tile under the player.
  local tile_info = tilemap.get_tile_info("/level#tilemap", "foreground", self.player_x, self.player_y)
  pprint(tile_info)
  -- {
  --    index = 0,
  --    h_flip = false,
  --    v_flip = true,
  --    rotate_90 = false
  -- }

NEW: (#9138) Add tilemap.get_tiles() function
Added a new function tilemap.get_tiles() which returns a table of rows with all the tile indexes for the layer.

local left, bottom, columns_count, rows_count = tilemap.get_bounds("#tilemap")
local tiles = tilemap.get_tiles("#tilemap", "layer")
local tile, count = 0, 0
for row_index = bottom, bottom + rows_count - 1 do
	for column_index = left, left + columns_count - 1 do
		tile = tiles[row_index][column_index]
		count = count + 1
	end
end

NEW: (#9069) Get and set material constants in GUI scripts via gui.get/gui.set
gui.get and gui.set can now be used to get or set material constants for a GUI node:

local node = gui.get_node("box")
local tint = gui.get(node, "tint")
tint.x = tint.x + dt * 0.1
go.set(node, "tint", tint)

FIX: (#9077) Fixed the issue where the tilemap wasn’t updated after a new tilesource was set
Fixed an issue where setting a Tile Source at runtime required deleting other tile maps already using the tile source before the change became visible.

FIX: (#8995) Fixed black screen on iOS launch
When launching an iOS game made in defold, a brief black screen could be observed in the transition from the launch screen to the game. This fix covers up that black screen with the contents of the launch screen.

FIX: (#9086) Fixed issue where all the tilemaps used only one material.
Fixed an issue where the material wasn’t properly taken into account when calculating a batch key, resulting in a bug where multiple tile maps couldn’t have different materials.

FIX: (#9098) Accept nil instead of a play properties table for model.play_anim()
A call to model.play_anim(url, anim, playback, [play_properties], [complete_function]) will now correctly accept nil instead of a Lua table for the play_properties argument.

FIX: (#9110) Fix issue that makes it impossible to use tilemap.set_tile() with physics on tiles with indexes greater than 2^16.
Fix the issue where tiles in tilemaps ignore their collision shape if set using tilemap.set_tile() and if a tile index greater than 65535.

FIX: (#9163) Fix for collection factory script instances having separate property sets
This fixes a crash when two script instances tries to delete the same property set.

FIX: (#9164) Fix the issue where the window becomes invisible after a restart.
Fixed the issue where the window becomes invisible after a restart or when building from the editor multiple times without closing the window.

FIX: (#9154) Use Gradle as the build system for Bob.jar
Using Gradle for Bob.jar makes it easier to set up and develop new features for Bob.jar by speeding up iterative builds and adding the ability to run single tests when needed.

A manual for setting up IntelliJ IDEA is available here.

FIX: (#9156) Fix bug when Display->Fullscreen has no effect
Fixed issue when Display->Fullscreen has no effect on macOS.

FIX: (#9157) Fix the bug where it’s possible to select the HTML5 game canvas if it’s not stretched.
Fix the issue where a long tap outside the canvas creates a magnifying tool in Safari when the HTML5 bundle doesn’t use Stretch mode for the canvas.

FIX: (#9159) Fix where a hash can be used as a regular string during concatenation in debug
Fix the issue where this construction produces a valid URL in debug:

local id = factory.create("#factory")
local broken_path = "main:"..id.."#sprite"
--- main:/go#sprite

Hash reverse strings don’t exist in release build, and the fact that it works in debug may cause confusion.
With this fix, the result of concatenation can’t be used as a valid URL:

--- main:[/go]#sprite

FIX: (#9158) Fix issue where HTML5 build reports Unknown instead of compilation shader errors
Fixed the issue where the HTML5 bundle reports Unknown instead of shader compilation errors. Additionally, as part of this fix, multiline output has been added for errors in HTML5 bundles.

Editor

BREAKING CHANGE: (#7261) Improve the time it takes to save soon after opening the editor

  • Improved the time it takes to save the project soon after opening it in the editor.
  • Breaking change: This change requires an updated version of extension-spine due to changes to the GuiNode interface in the editor.

NEW: (#9081) Overhauled editor save system
Overhauled the systems that are responsible for loading and saving project files in the editor.

Default values and non-overridden values originating from referenced resources such as Gui template scenes will no longer be written to the project files.

The updated sparse file formats will be used for any files that are saved from now on. If you want to upgrade all the project files to the new sparse file formats at once, select Upgrade File Formats… from the File menu.

If you’ve built an extension that includes experimental Clojure-based editor plugins (maybe based on the the extension-simpledata project on GitHub?), you can port it to the new save system by making changes corresponding to our own changes to extension-simpledata. In summary:

  • You should use editor.graph-util/set-properties-from-pb-map in the :load-fn of your Protobuf-based resource types to make sure we only return transaction steps that set properties that are present in the data we read from disk.
  • Every property in your Protobuf-based defnodes should include a default value from the specific Protobuf field it is backed by to ensure the node works correctly when we don’t have a value for the field in the data we read from disk.
  • You should use protobuf/make-map-without-defaults when producing the save-value output in your Protobuf-based defnodes to ensure we don’t write defaults to disk when saving.

NEW: (#9091) Tile Source editor: “Collision groups” text color in the outline now corresponds to the tile collision color.
Make it clear which collision group corresponds to which area in the tile source.

NEW: (#9101) Add validation for URL symbols ‘:’ and '#'
Added validation to warn the user if a Collection’s name, GO’s or Component’s IDs contain special URL symbols such as ‘:’ and ‘#’.

NEW: (#9133) Add icons to properties fields to differentiate URL/hash/number
Makes it easier to distinguish between number, hash, and URL go.properties() using icons.

NEW: (#9140) Editor: Default to internal code editor for .appmanifest files
Default to using the internal code editor and its accompanying generator UI for .appmanifest files.

NEW: (#9144) Editor: Support viewing library resources in Custom Code Editor
It is now possible to view library resources with the configured Custom Code Editor.

NEW: (#9162) Use code view when opening resources as text

  • The editor will now use the full-featured code editor view when you choose Open As > Text for a resource.
  • If you have a Custom Code Editor configured in Preferences, you now have the option to Open As > Text in Defold Editor alongside Open As > Text in Custom Editor.
  • Fixed an issue where it was possible to insert line breaks into the Console by pressing return.
  • Fixed a CSS style regression on the Evaluate Lua input field in the Console.

NEW: (#9171) Added the ability for tables to change their width in form view to improve material editing
Fixed the issue where the table view in form view had a very small maximum width, making it difficult to edit materials and leaving most of the widescreen empty.

NEW: (#9174) Add possibility to delete, cut and move selected tiles in tilemap
Added an ability to cut tiles using Shitf+Ctrl and erase tiles using Shirt+Atl in the tilemap editor.

FIX: (#9176) Fix various issues related to Gui size overrides in the editor

  • Fixed exception when clearing a manual Size override while Size Mode overrides Auto to Manual.
  • Clear out hidden Gui node manual Size overrides when the Size property is controlled by the assigned Texture.

FIX: (#9116) Fix the last column size for the table view in the Editor.
Fix the issue where the last column in a table has a minimum width size, making it hard to edit.

FIX: (#9139) Editor: Fix load crash resulting from missing Gui template resource
Fixed editor crash when loading a Gui scene that overrides properties on nodes inside a missing template resource.

FIX: (#9141) Add Enter/Esc controls for properties in the editor
Now, if a property is selected, the Esc button cancels uncommitted changes and unselects the property; the Enter button commits changes and selects the value. If the value is selected, it then unselects it.

FIX: (#9197) Fixed tilemap brush visibility
Fixed the issue where brush tiles were always behind the tilemap layers.

FIX: (#9189) Fix issue when the first single value input into a property field right after the property reset may be lost
Fix the issue where a property value was reset and immediately replaced with a single input value, which would not be saved after the field is unfocused.

Extensions

FIX: (#65) Updated to Play Billing 6.0.0
FIX: (#44) Added support for app open ads for AdMob
FIX: (#167) Update to spine-c 4.2

25 Likes

The release notes updated with a missed feature :point_up_2:

5 Likes

All of these gameobjects are moving in X for no obvious reason…
It won’t be easy to strip down a simple repro for this - any suggestions on how to debug?
(Edited to remove game video now that issue is resolved)

Maybe it’s related to this one?

I’m not sure if you use physics there

1 Like

It is something related to that, as if I remove the collision objects then they stop moving.
The collision objects are used for cursor interaction and item merging / drag and drop. I’m not familiar with other aspects of physics in Defold, but we’re not sending any apply_force messages.

Also, at runtime the the linear_velocity and angular_velocity properties of the associated collision objects appear to be zero.

It’s hard to guess.
I tried a couple of simple setups and can’t reproduce anything like that.
Maybe you can check things one by one starting from parents, get and print velocity of their physics objects to check if it has some etc. and if so catch the moment it becomes non-zero. + physics debug to see physics objects and forces.

Adding a kinematic collision object to a child GO changes the position of the child in 1.9.1 Beta (doe not occur in 1.9.0). To set up:
Empty project
Create two GO in main dir, goParent, goChild.
Add these to main collection (as parent and child!)
Create an atlas for logo_256 and add sprite to both GO
Move both GO apart. I used Parent=(299,464,0) Child=(297,-294,0)
Ctrl-B and check both are visible and stationary.
Add a kinematic collision object, with a box, to the child.
Child disappears in 1.9.1 BETA, not in 1.9.0 release.

Edit: I added a print to track the location of the child, it moves away rapidly, eg in the first time-step it has moved to (595,194,0), it keeps on moving away.

Edit: This is now fixed (tested with 18a599e)

3 Likes

Thank you for detailed explanation of a repro case.

We decided to revert this fix for now.

I’ll let you know when the build with this fix reverted will be available.

UPD: new version is available

4 Likes

New fix added for the following issue:

https://forum.defold.com/t/mouse-scroll-wheel-input-triggers-erratically/77432/4

6 Likes

Offf you cannot still edit .md files. What is the use of being able to open it in Defold editor if you cannot edit it.

.md files are really useful for explaining content, in particular for tutorials (open: New Project, From Tutorial). I find this way of learning much better than (passive) YouTube. It would be handy to be able to open them in edit mode, however it is no big deal, there more text editors in the world than you can shake a stick at. Creating a monolithic IDE that does everything is asking for trouble. It will probably magically be added at some point in future time.

Yep there is a lot of text editors that can open an .md file but that is not my point, its about convenience. Defold has an built-in code editor which is picked by default but it being unable to edit a simple .md file causes editor separation. It took a lot of time to configure sublime as an external editor and vs code extensions create .vscode folders for all your projects which makes them redundant and annoying. That’s why being able to use built-in editor would be great instead of switching to another software. Besides I do not think this would involve much work since built-in editor is able to edit other utf-8 encoded files like .json

1 Like

Except you don’t have to set up Defold with an external editor to change an MD file. :sweat_smile:

You can right-click and “Show in Desktop”, and open the file in your standard text editor with one more double-click.

In 1.9.1, the goal was to clean up how the editor works with internal and external editors. As part of this goal, the old text viewer was replaced with the main code editor in read-only mode.

We have a separate task to add the ability to edit *.md and some other files, and it will be implemented at some point.

6 Likes

Two small fixes for 1.9.1 added

9 Likes

Tryed beta today. Something was wrong with font outline (zero) in web.
Only in web. In editor it was correct.

Problem with bundle.

When build from editor fonts correct.
When bundle (web, windows) outline alpha was missed. And set to 1 as default, when need to be another value.

Looks like outline was vector 4. Now it vector 3 + outiline_alpha value

Don’t use text shadows in my project. But i think they also can have same problem





2 Likes

Problems with outline alpha. On some labels after i upgrade project to new file format.

nodes {
  position {
    y: 5.0
  }
  scale {
    x: 0.9
    y: 0.9
  }
  size {
    x: 200.0
    y: 100.0
  }
  color {
    x: 0.502
    y: 0.6
  }
  type: TYPE_TEXT
  text: "Privacy policy"
  font: "game_font"
  id: "text"
  outline {
    x: 0.6
    y: 0.502
    z: 0.902
  }
  shadow {
    x: 1.0
    y: 1.0
    z: 1.0
  }
  parent: "btn_privacy/root"
  inherit_alpha: true
  outline_alpha: 0.0
  text_leading: 0.0
  text_tracking: 0.02
}

outline_alpha: 0.0 but in bundle it always 1

2 Likes

Thank you for reporting it. Could you please create an issue on GitHub so that we can start an investigation?

1 Like

I can create it tomorrow in morning. I will try not to forget:)