Defold 1.3.6 has been released

Defold 1.3.6

Summary

Engine

  • NEW: (#3614) Add matrix user constant type
  • NEW: (#6529) Add array support for constant buffers in render scripts
  • NEW: (#6155) Add anisotropic filtering support for material samplers
  • NEW: (#6532) Add more descriptive error message to sys.save
  • NEW: (#6676) Increase table serialization limits
  • NEW: (#6872) Change profiler layout for representation in runtime
  • NEW: (#6828) Center view on camera
  • FIX: (#6945) Added raw gamepad input to gui scripts
  • FIX: (#6224) Added particle initial stretch values to emitter template
  • FIX: (#6818) Luajit updated LuaJIT to version 633f265
  • FIX: (#6852) Updated Remotery 1.2.1
  • FIX: (#6883) Fix rare crash in profiler
  • FIX: (#6898) Byte code errors in multi-architecture builds run on a 32-bit device
  • FIX: (#6613) Fix issue when backspace holding doesn’t work on iOS
  • FIX: (#6764) Make it possible to avoid filling device_ident value
  • FIX: (#6531) Don’t automatically enable all extensions on WebGL
  • FIX: (#6858) Prevent situations when app hangs in infinite loop instead of crash on MacOS
  • FIX: (#6597) Fix crash in some cases when count of labels more than label.max_count
  • FIX: (#3400) Update iconexe and defold icon with a bigger size
  • FIX: (#6847) Use --verify-graphics-calls=false by default for HTML5
  • FIX: (#5727) Fix issue with force using of landscape mode in iOS games on macOS with M1

Editor

  • NEW: (#3981) Expose sprite scaling in the editor
  • NEW: (#6786) Use label as tooltip text for unknown settings
  • FIX: (#6885) Fix Lua breakpoints not hitting unless bytecode is embedded
  • FIX: (#6399) Retain specific expensive outputs in editor cache
  • FIX: (#6806) IDE: Unsorted order of assets
  • FIX: (#6796) Profiler is sometimes unresponsive
  • FIX: (#6388) Skip engine build when running on a remote target
  • FIX: (#6678) Fix shift+click selection in select list dialog
  • FIX: (#6925) Show options when there are multiple candidates for a partial console path

Details

Engine

NEW: (#3614) Add matrix user constant type

It is now possible to set matrix constants in materials via go.set or render.constant buffers:

local buffer = render.constant_buffer()
buffer.ny_matrix = vmath.matrix4()

NEW: (#6529) Add array support for constant buffers in render scripts

Constant buffers supports setting array values by using tables:

local buffer = render.constant_buffer()
-- in-line
buffer.my_array = { vmath.vector4(), vmath.vector4() }
-- as elements
buffer.my_array = {}
buffer.my_array[1] = vmath.vector4()

NEW: (#6155) Add anisotropic filtering support for material samplers

Material sampler slots now have a new field called max_anisotropy that you can use to set the level of anisotropic filtering for specific shader samplets. The max value is determined by the device driver and will be capped to the max value if a higher value has been provided.

NEW: (#6532) Add more descriptive error message to sys.save
If a sys.save() operation fails the error message will now contain additional information about the reason.

This PR adds a new function in dstrings.h (dmStrError) that translates and copies errno values to a buffer for printing human readable error messages.

NEW: (#6676) Increase table serialization limits
It is now possible to serialize Lua tables with more than 65535 keys (new max is 2^32). The previous maximum size of 512kb for the serialized table has been removed and dynamic memory allocation will be used for tables larger than 512kb.

Note: The save file format has changed which means that a file saved with 1.3.6 is not compatible with older versions of Defold.

NEW: (#6872) Change profiler layout for representation in runtime
Fix issue when many property values rendered out of screen in the runtime profiler.

NEW: (#6828) Center view on camera
Added an option on the camera component to toggle from the default perspective projection to an orthographic projection. When a camera component is in orthographic projection mode it will automatically center on the position of the game object the camera belongs to.

A new orthographic_zoom property has also been added to the camera component to change the zoom level when using the orthographic projection. This can be used either as a fixed zoom or from a script to set a variable zoom level based on window dimensions.

These changes are compatible with the existing default render script. To use both the view and projection from the camera the developer must send a use_camera_projection message to the render script. The camera and render documentation need to be changed to reflect these changes.

FIX: (#6945) Added raw gamepad input to gui scripts
Raw gamepad events were previously only sent to script components. This fix adds raw gamepad input events to gui scripts as well.

FIX: (#6224) Added particle initial stretch values to emitter template
This fix adds missing values to the particle emitter template used by the editor when adding an emitter to a particlefx.

FIX: (#6818) Luajit updated LuaJIT to version 633f265

FIX: (#6925) Show options when there are multiple candidates for a partial console path
When multiple project resources match a partial file path in the Console, we now present a choice of resources to open.

FIX: (#6871) Updated Remotery 1.2.1
This change updates the Remotery profiler to version 1.2.1. The new version contains bug fixes and performance improvements.

FIX: (#6883) Fix rare crash in profiler
Make sure that profiler doesn’t crash if Lua doesn’t provide information about function source.

FIX: (#6898) Byte code errors in multi-architecture builds run on a 32-bit device
The 32- and 64-bit byte code delta used to patch 64-bit byte code for 32-bit devices was sometime calculated incorrectly such that the written byte code became invalid. This could be observed when bundling for both 32-bit and 64-bit and running the build on a 32-bit device (Android)

FIX: (#6613) Fix issue when backspace holding doesn’t work on iOS
This fix makes it possible to remove multiple symbols if a user holds backspace button instead of a single tap - a single character removing.

FIX: (#6764) Make it possible to avoid filling device_ident value
Fixed issue when GetSystemInfo() (the method used internally and for sys.get_sys_info()) by default requests device_ident . On Android this is android_id - a value secured by OS. If an application requests this then Data Safety Section needs to be filled even if app doesn’t use internet connection and any IDs at all.
If you don’t need device_ident value just call sys.get_sys_info() function with {ignore_secure = true} parameter: sys.get_sys_info({ignore_secure = true})

FIX: (#6531) Don’t automatically enable all extensions on WebGL

FIX: (#6858) Prevent situations when app hangs in infinite loop instead of crash on MacOS
Fixes a rare situations when application hangs in infinite loop instead of crash on MacOS.

FIX: (#6597) Fix crash in some cases when count of labels more than label.max_count
Fixes crash that reproduces with the following conditions:

  • objects spawned by a collection factory;
  • objects has a parent-child hierarchy;
  • the parent object has a component that can’t be spawned because of max components limit.

FIX: (#3400) Update iconexe and defold icon with a bigger size
The problem was that the IconExe class doesn’t add any icons, it just replaces the ones that exist. Our default icon was previously 128x128 as max resolution, this PR replaced it with a log thats 256x256.

This PR also updates our IconExe.java to the newest version from latest SWT master.

FIX: (#6847) Use --verify-graphics-calls=false by default for HTML5
Verifying of the graphics calls in html5 build maybe useful for debug reason, but it’s may be very slow on some browsers. This fix makes --verify-graphics-calls=false the option by default to make build faster even in debug. But if you have any graphics related issues in your buld while testing, remove this argument or change it to --verify-graphics-calls=true to have more information what’s going on.

FIX: (#5727) Fix issue with force using of landscape mode in iOS games on macOS with M1
Fixed issue when iOS game installed on M1 Mac forces to use landscape mode even if game made in portrait mode.

Editor

NEW: (#3981) Expose sprite scaling in the editor
The sprite component has a scale but it has not been possible to modify it from the editor. The sprite scale could only be change at runtime using go.set("#sprite", "scale", vmath.vector3()). This change adds a scale property to the sprite component, next to the already existing position and rotation properties.

NEW: (#6786) Use label as tooltip text for unknown settings
This allows viewing the full name of a setting in a tooltip when it does not fit in its place.

FIX: (#6885) Fix Lua breakpoints not hitting unless bytecode is embedded
Fixed Lua debugger breakpoints not suspending execution when running from the editor or bundling with the --use-lua-source flag.

FIX: (#6399) Retain specific expensive outputs in editor cache

  • Reduced the time spent on subsequent Build and Save operations when editing a large project.
  • Added a Shared Editor Settings editor to the Project menu where projects can adjust the cache size used by the editor for all users working in the project. If you still experience frequent delays in the editor after this change, try increasing the cache size.

FIX: (#6806) IDE: Unsorted order of assets
Fixed sorting.

FIX: (#6796) Profiler is sometimes unresponsive
Added a profiler.sleep_between_server_updates game.project setting to set the delay in milliseconds between profiler server updates. Try changing this value to something like 50ms if you have problems with the computer becoming unresponsive while using the profiler.

The profiler will now also reuse any existing profiler port when reconnecting. This should solve reported issues with profiler connection problems.

FIX: (#6388) Skip engine build when running on a remote target

FIX: (#6678) Fix shift+click selection in select list dialog
This changeset instructs ListViewBehavior to not set the anchor for shift-selection to the end of a list when we change list items by typing into filter text field.

22 Likes

So. Many. Updates!
Seriously, each update is visibly larger recently :+1:
Thank you! :heart:

7 Likes

Really great releases lately!

I’m bundling Android now, and appreciate all the detailed build logs in the Console. Huge improvement :+1:

6 Likes

NEW: (#6676 ) Increase table serialization limits
It is now possible to serialize Lua tables with more than 65535 keys (new max is 2^32). The previous maximum size of 512kb for the serialized table has been removed and dynamic memory allocation will be used for tables larger than 512kb.

Note: The save file format has changed which means that a file saved with 1.3.6 is not compatible with older versions of Defold.

Has there been some change to how sys.save() has to be used now or some way to manually allocate memory? I’m not seeing anything new in the documentation, but since this update sys.save has been allocating random amounts of memory each time I build my project, so it’s random whether or not it fails when I try to save a table. The buffer allocated for saving the same exact data (this is just saving default configuration settings each time I launch the project) varies wildly with each run.

Just some examples of different times I run my game so you can see the buffer variations (all when writing saving the same table on different executions):

buffer (895 bytes) too small for table, exceeded at value (string) for element #35

buffer (2001 bytes) too small for table, exceeded at 'resolutions_index' for element #5

buffer (56 bytes) too small for table, exceeded at value (string) for element #3

1 Like

Oh. no, it seems like a bug that wasn’t discovered in the beta or with the unit tests. Can you please share a sample project where this can be reproduced?

2 Likes

Yeah, I’ll try to put together a small project where this can be reproduced later today.

1 Like

https://github.com/dblumin45/save_bug_repro

Didn’t take me long at all to reproduce in a small project, so hopefully that makes it easier to pinpoint the issue. Thank you

1 Like

What platform did you try it on?

I have the same problem.
I’m just running a build on Windows 10 in the editor

These are all awesome changes! As someone else said, each update is bringing more and more cool stuff! One small question, though:

Is 1.3.6 backwards compatible with loading older saves? I suppose so, but it would be pretty bad for players to lose their saved progress when they update the game, so I’m asking just to be sure.

1.3.5 → 1.3.6 ok
1.3.6 → 1.3.5 doesn’t work

3 Likes

1.3.5 → 1.3.6 doesn’t work in my case :thinking:

(defold editor on windows 10)

buffer (63 bytes) too small for table, exceeded at ‘Main’ for element #3

We have this too. I thought we tested the beta. ¯\(ツ)

1 Like

I’m sure all of us did, but apparently not enough and not with enough variation in the data. It has to do with memory alignment of numbers so it doesn’t always happen unfortunately. I’m working on a fix for the issue and we will release a new version tomorrow. We also discovered an issue with luajit on Linux that we’ll fix at the same time.

3 Likes

Late, but I have the issue on windows 10 also, running from the editor.

Hello,
First, thanks for all the work you have done on this release.

I’m pretty new to Defold, so maybe I miss something but with the new version (1.3.6) when I try to launch a project (even on empty project) I got some error with the following message

Cannot run program “/home/cmarc/.Defold/unpack/f06501e9ac279cae0372b04f3fbc2800f7ecaf9c/x86_64-linux/bin/luajit-32”: error=2, No such file or directory

I have never seen this error with prior version of Defold so for the moment I stay on the version 1.3.5. If anybody has a solution, I’d be happy to.


System information

  • OS: Linux
  • Distribution: Fedora 36
  • Architecture: x86_64
1 Like

If you really want to update, check here for a workaround: Cannot run program "home/admin/.Defold/.../x86_64-linux/bin/luajit-32": error=2, Folder or file does not exist - #11 by kovarskic

1 Like

Thank you for the answer, I’ll do this.

1 Like

We will release a new version with a fix later today.

9 Likes

Sorry for the delay. The release is building now.

7 Likes