Defold 1.11.1 Beta

Defold 1.11.1 BETA

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 GitHub: Release v1.11.1 - beta · defold/defold · GitHub

Summary

  • BREAKING CHANGE: (#11163) Allow setting game.project properties using editor scripts (by vlaaad)
  • NEW: (#10590) Add function to get Vulkan handles to dmsdk (by ekharkunov)
  • NEW: (#7902,#9498) Added new function go.update_world_transform() (by AGulev)
  • NEW: (#11052) Set PBR properties for shaders (by Jhonnyg)
  • NEW: (#5889) New functions: gui.set_layout() and gui.get_layouts() (by AGulev)
  • NEW: (#9302) Doubled the object limit to 65,534 per collection (by AGulev)
  • NEW: (#6849,#10579) Added orthographic camera projection modes (by AGulev)
  • NEW: (#10255) Add support for enabling file logging in release mode (by AGulev)
  • NEW: (#3625) Added sort_order option to render.draw() in render_script (by AGulev)
  • NEW: (#9291) Added start_time and start_frame parameters for sound.play() (by AGulev)
  • NEW: (#11147) Disallow non-top-level go.property calls in scripts (by vlaaad)
  • NEW: (#10601) Move deleted files into trash bin (by vlaaad)
  • NEW: (#11158) Show literal labels for user-defined properties (by matgis)
  • FIX: (#11208) Properly calculate new polygon centroid when scaling a collision object shape (Box2d v3) (by JCash)
  • FIX: (#11216) Fix remotery web-profiler connection on macOS (by AGulev)
  • FIX: (#11204) Vulkan fix validation errors (by Jhonnyg)
  • FIX: (#11233) On opengl the graphics frame start now sets the default framebuffer (by JCash)
  • FIX: (#11235) New public APIs (by ekharkunov)
  • FIX: (#10921) Vulkan improve texture upload performance (by Jhonnyg)
  • FIX: (#9917) Fix frustrum culling for sprites with pivot point (by ekharkunov)
  • FIX: (#11159) Suggest fetching libraries when modifying game.project dependencies (by vlaaad)
  • FIX: (#11141) Fix Console not working when the custom resolution feature is enabled (by AGulev)
  • FIX: (#11189) Decrease editor size by 12 MB (by vlaaad)
  • FIX: (#11191) Fixed code editor freeze when matching against very long strings (by matgis)

Engine

NEW: (#10590) ‘Add function to get Vulkan handles to dmsdk’ by ekharkunov
Following functions are the part of public SDK now:

void AddVertexStream(HVertexStreamDeclaration stream_declaration, dmhash_t name_hash, uint32_t size, Type type, bool normalize);
AdapterFamily GetInstalledAdapterFamily();
HTexture NewTexture(HContext context, const TextureCreationParams& params);
void DeleteTexture(HContext context, HTexture texture);
void SetTexture(HContext context, HTexture texture, const TextureParams& params);
void SetTextureAsync(HContext context, HTexture texture, const TextureParams& params, SetTextureAsyncCallback callback, void* user_data);
void SetTextureParams(HContext context, HTexture texture, TextureFilter min_filter, TextureFilter mag_filter, TextureWrap uwrap, TextureWrap vwrap, float max_anisotropy);
uint32_t GetTextureResourceSize(HContext context, HTexture texture);
uint16_t GetTextureWidth(HContext context, HTexture texture);
uint16_t GetTextureHeight(HContext context, HTexture texture);
uint16_t GetTextureDepth(HContext context, HTexture texture);
uint16_t GetOriginalTextureWidth(HContext context, HTexture texture);
uint16_t GetOriginalTextureHeight(HContext context, HTexture texture);
uint8_t GetTextureMipmapCount(HContext context, HTexture texture);
TextureType GetTextureType(HContext context, HTexture texture);
uint8_t GetNumTextureHandles(HContext context, HTexture texture);
uint32_t GetTextureUsageHintFlags(HContext context, HTexture texture);
uint32_t GetTextureStatusFlags(HContext context, HTexture texture);
void EnableTexture(HContext context, uint32_t unit, uint8_t id_index, HTexture texture);
void DisableTexture(HContext context, uint32_t unit, HTexture texture);
const char* GetTextureTypeLiteral(TextureType texture_type);
const char* GetTextureFormatLiteral(TextureFormat format);
uint32_t GetMaxTextureSize(HContext context);

Added following platform-dependent functions for Vulkan to public SDK:

VkDevice VulkanGetDevice(HContext context);
VkPhysicalDevice VulkanGetPhysicalDevice(HContext context);
VkInstance VulkanGetInstance(HContext context);
uint16_t VulkanGetGraphicsQueueFamily(HContext context);
VkQueue VulkanGetGraphicsQueue(HContext context);
VkRenderPass VulkanGetRenderPass(HContext context);
VkCommandBuffer VulkanGetCurrentFrameCommandBuffer(HContext context);
bool VulkanCreateDescriptorPool(VkDevice vk_device, uint16_t max_descriptors, VkDescriptorPool* vk_descriptor_pool_out);

NEW: (#7902,#9498) ‘Added new function go.update_world_transform() by AGulev
A new function go.update_world_transform() has been added. It recalculates the world transform of an object along with its entire hierarchy up to the root objects.

NEW: (#11052) ‘Set PBR properties for shaders’ by Jhonnyg
Material properties from a GLTF file are now exposed into shaders via a special hard-coded uniform:

uniform PbrMaterial
{
    // Common properties
    vec4 pbrAlphaCutoffAndDoubleSidedAndIsUnlit; // R: alphaCutoff (Default=0.5), G: doubleSided (Default=false), B: unlit (Default=false)
    vec4 pbrCommonTextures;                      // R: use normalTexture, G: use occlusionTexture, B: use emissiveTexture
    PbrMetallicRoughness  pbrMetallicRoughness;
    PbrClearCoat pbrClearCoat;
   ... etc.
}

All properties that are available in our data format is now set in a model components material, if they exist in the shader. Here is the material specification from the engine source, which contains all the fields we currently support:

To read more about how this works, head over to the manual entry.

Note: There is currently no PBR shader as part of the builtins. This will be included at a later time, but in the meanwhile you can use the Defold PBR extension.

NEW: (#5889) ‘New functions: gui.set_layout() and gui.get_layouts() by AGulev
Added new functions gui.set_layout() and gui.get_layouts():

local ok = gui.set_layout("Portrait")
  if not ok then
      print("Portrait layout not found in this scene")
  end
local layouts = gui.get_layouts()
for id, size in pairs(layouts) do
    print(id, size.x, size.y)
end

A new checkbox, Auto Layout Selection, has been added to Display Profiles. It disables automatic layout detection in the project:

NEW: (#9302) ‘Doubled the object limit to 65,534 per collection’ by AGulev
You can now use double the number of objects per collection compared to before: 65,534.

NEW: (#6849,#10579) 'Added orthographic camera projection modes ’ by AGulev
New functionality for camera added:

  • Added orthographic camera modes: ORTHO_MODE_FIXED, ORTHO_MODE_AUTO_FIT (contain), and ORTHO_MODE_AUTO_COVER (zoom).
  • New Camera properties in Editor: “Orthographic Mode” (available only when Orthographic Projection is enabled).
  • Lua API: camera.get_orthographic_mode() and camera.set_orthographic_mode()
camera.get_orthographic_mode("#camera")
camera.set_orthographic_mode("#camera", camera.ORTHO_MODE_AUTO_FIT)

NEW: (#10255) 'Add support for enabling file logging in release mode ’ by AGulev
You can now enable file logging in Release mode.
The previous Write Log option has been deprecated and replaced with a new Write Log File setting, which offers three choices: Never, Debug, and Always.

CleanShot 2025-09-12 at 15 22 00@2x

NEW: (#3625) ‘Added sort_order option to render.draw() in render_script by AGulev
You can now choose from the following sort orders when using render.draw():

  • render.SORT_BACK_TO_FRONT (default)
  • render.SORT_FRONT_TO_BACK
  • render.SORT_NONE

NEW: (#9291) ‘Added start_time and start_frame parameters for sound.play() by AGulev
You can now specify start_time or start_frame (audio frame) when calling sound.play().

FIX: (#11208) ‘Properly calculate new polygon centroid when scaling a collision object shape (Box2d v3)’ by JCash
Fixes an issue where Box2D v3.x asserts on a small polygon radius when using continuous collision.

FIX: (#11216) ‘Fix remotery web-profiler connection on macOS’ by AGulev
Fixes a regression where the Remotery web profiler is unable to connect to the build on macOS

FIX: (#11204) ‘Vulkan fix validation errors’ by Jhonnyg
Multiple validation errors have been fixed for the Vulkan graphics adapter. This essentially means that the Vulkan backend should be more stable and reliant than before. Please let us know if you encounter more validation errors!

FIX: (#11233) ‘On opengl the graphics frame start now sets the default framebuffer’ by JCash
This helps when other extensions accidentally leave the wrong framebuffer set.

Also added dmGraphics::OpenGLGetDefaultFramebufferId(context) to dmSDK

FIX: (#11235) ‘New public APIs’ by ekharkunov
Added new public APIs

// dmGraphics namespace

uint32_t GetWindowWidth(HContext context);
uint32_t GetWindowHeight(HContext context);
uint32_t GetWidth(HContext context);
uint32_t GetHeight(HContext context);
void SetStencilMask(HContext context, uint32_t mask);
void SetStencilFunc(HContext context, CompareFunc func, uint32_t ref, uint32_t mask);
void SetStencilFuncSeparate(HContext context, FaceType face_type, CompareFunc func, uint32_t ref, uint32_t mask);
void SetStencilOp(HContext context, StencilOp sfail, StencilOp dpfail, StencilOp dppass);
void SetStencilOpSeparate(HContext context, FaceType face_type, StencilOp sfail, StencilOp dpfail, StencilOp dppass);
void EnableState(HContext context, State state);
void DisableState(HContext context, State state);
void SetBlendFunc(HContext context, BlendFactor source_factor, BlendFactor destinaton_factor);
void SetColorMask(HContext context, bool red, bool green, bool blue, bool alpha);
void SetDepthMask(HContext context, bool enable_mask);
void SetDepthFunc(HContext context, CompareFunc func);
HContext GetInstalledContext();
HRenderTarget NewRenderTarget(HContext context, uint32_t buffer_type_flags, const RenderTargetCreationParams params);
void DeleteRenderTarget(HContext context, HRenderTarget render_target);
void SetRenderTarget(HContext context, HRenderTarget render_target, uint32_t transient_buffer_types);
HTexture GetRenderTargetTexture(HContext context, HRenderTarget render_target, BufferType buffer_type);
void GetRenderTargetSize(HContext context, HRenderTarget render_target, BufferType buffer_type, uint32_t& width, uint32_t& height);
void SetRenderTargetSize(HContext context, HRenderTarget render_target, uint32_t width, uint32_t height);
PipelineState GetPipelineState(HContext context);
void SetCullFace(HContext context, FaceType face_type);
void RepackRGBToRGBA(uint32_t num_pixels, uint8_t* rgb, uint8_t* rgba);
float GetDisplayScaleFactor(HContext context);
// dmRender namespace

const dmVMath::Matrix4& GetViewMatrix(HRenderContext render_context);
HMaterial NewMaterial(HRenderContext render_context, dmGraphics::HProgram program);
void DeleteMaterial(HRenderContext render_context, HMaterial material);
void ClearMaterialTags(HMaterial material);
void SetMaterialTags(HMaterial material, uint32_t tag_count, const dmhash_t* tags);
bool SetMaterialSampler(HMaterial material, dmhash_t name_hash, uint32_t unit, dmGraphics::TextureWrap u_wrap, dmGraphics::TextureWrap v_wrap, dmGraphics::TextureFilter min_filter, dmGraphics::TextureFilter mag_filter, float max_anisotropy);
dmhash_t GetMaterialSamplerNameHash(HMaterial material, uint32_t unit);
uint32_t GetMaterialSamplerUnit(HMaterial material, dmhash_t name_hash);
void ApplyMaterialConstants(HRenderContext render_context, HMaterial material, const RenderObject* render_object);

FIX: (#10921) ‘Vulkan improve texture upload performance’ by Jhonnyg
Performance for dynamic texture uploads have been improved when using the Vulkan backend.

FIX: (#9917) ‘Fix frustrum culling for sprites with pivot point’ by ekharkunov
Fixed culling for sprites with pivot points. Also implemented some optimization on how geometry data calculated and stored between batches. So no it should be a bit faster in terms of calculation but consume some memory to store cached information.

Editor

BREAKING CHANGE: (#11163) ‘Allow setting game.project properties using editor scripts’ by vlaaad
Now, it’s possible to set properties in the game.project file using editor scripts:

editor.transact({
    editor.tx.set("/game.project", "project.dependencies", {
        "https://github.com/defold/extension-spine/archive/refs/tags/3.10.0.zip"
    })
})

:police_car_light: Breaking change :police_car_light: for extensions that are based on extension-simpledata: Now, the editor expects the code that is invoked when form values are set/cleared to return transaction steps instead of performing a transaction. See this PR for the changes you need to make.

NEW: (#11147) ‘Disallow non-top-level go.property calls in scripts’ by vlaaad

NEW: (#10601) ‘Move deleted files into trash bin’ by vlaaad

NEW: (#11158) ‘Show literal labels for user-defined properties’ by matgis
We now label user-defined properties in the Property Editor using the literal name the property was declared as.

FIX: (#11159) ‘Suggest fetching libraries when modifying game.project dependencies’ by vlaaad
We now show a notification when dependencies change:
Screenshot 2025-08-29 at 10 21 09

FIX: (#11141) ‘Fix Console not working when the custom resolution feature is enabled’ by AGulev
Fixes the issue where logs in the Editor’s console don’t work when Simulated Resolution is used (Windows only).

FIX: (#11189) ‘Decrease editor size by 12 MB’ by vlaaad

FIX: (#11191) ‘Fixed code editor freeze when matching against very long strings’ by matgis

  • Rewrote the fuzzy text matching algorithm to use less memory and perform matches faster.
  • Fixed a freeze that could occur in the code editor when attempting to perform a fuzzy text match against very long autocomplete suggestions originating from non-Lua files in some projects.
  • Fixed an exception that would occur if a fuzzy text search term included the Turkish capital letter I (İ) on a machine running under a non-Turkish locale setting.
18 Likes

So many changes from community feature requests! Thank you so much!

Question: Was Box2D 3.0 upgraded to 3.1? I don’t see it in the changelog, but I do see it in build.py, so it looks like it was.

6 Likes

Ah, yes we updated to Box2d v3.1 but forgot to tag it to the release.
Note that we’re still using Box2d v2.2 by default (our modified version) as it’s currently still more performant.

8 Likes

Updated yesterday night and I have some strange behaviour.
I have a sprite that mimics a cursor and for a frame it displays a weird shape. I’m attaching a video to show the bahviour. The only thing that I can see is that the sprite is rotated in the atlas.
Previous version of Defold does not show the issue.

your code goes here
1 Like

Thanks, yes that looks strange. :thinking:
I’ll ping @ekharkunov as he made the most recent changes to the sprite rendering.

May I ask you to attach an example project? It helps me to reproduce and find the reason of the bug

3 Likes

I’ll prepare one

3 Likes

my_project.zip (7.5 MB)

Attached is a minimal project. I’ve noticed that with this stripped down version it happens less, but it still happens.
Let it blink for a while or close and rerun the project. You can press s to switch from portrait to landscape.
It’s like at some point the sprite animation goes out of sync.
I’m on OSX Sequoia btw, on mac book pro m1.

If you can’t reproduce it let me know and I can set you up on the git repo.

3 Likes

I added a bunch of icon textures to my atlas and noticed that some are rotated 90 degrees. Extrude Borders is 2, but when I set it to 1 or 0 then the issue disappears. I tried to set the value to 123 or some such and editor froze and then OS (Linux) ran out of memory after waiting a little bit.

Atlas is 1024x512 after adding the icons.

Tried to get to the botton of this but can’t find any solution on my end.

I wonder if this is connected to the new camera component or the frustrum culling for sprites with pivot since I’ve noticed that apart from the cursor sprite glitch, other parts misbehave when exporting for web, with objects disappearing unless I put a very big difference in the z value of certain sprites.

The project is already scale along z aware and works just fine in 1.11.0 (both in desktop and web) and inspecting all the z-values they are what I would expect.

I reproduced the initial bug (it’s easier to notice if set animation fps to 50, for example). I’m still investigating what caused such behavior. Will update you as soon as I find the reason.

3 Likes

Fix was landed in eda885ab15e5ffac3e84216e8fa53aa0ec23ad8a (latest beta). Thanks for the report.

5 Likes

Confirmed it solves it. Thank you very much!

Now I need to find out why some sprites are not there in html5 vs desktop (again, only in this beta version).
I’ll ping once I know more.

2 Likes

Thank you for everything, excellent work! :blush:

This is another minimal project to reproduce the issue I’m having with the latest beta.
Label does not display in html5 builds, works on desktop. Defold 1.11.0 works as expected.

Not sure if it’s related to the other issue, but the only thing I can see is that the game object with the label is spawned via a factory and parented in code to another game object.

myproject.zip (882.7 KB)

3 Likes

Please can you say where in the manual the entry on how this pbr material works is?

Ah I haven’t published it yet, I’ll let you know

2 Likes

Fixed, build should be ready in ~1h

UPD: the build is ready

4 Likes

Confirmed this is working again. Thank you!

2 Likes