Defold 1.11.1 has been released

Defold 1.11.1

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.
20 Likes

Thank you for the updates and QoL improvements :slight_smile:

1 Like

Thanks!

1 Like

Is this documented anywhere on the defold site? I found the blog post for 1.11.0. But nothing on 1.11.1 yet. Is there a central repository for defold updates?

Thank you for all you’re doing to improve defold.