Defold 1.13.0 BETA

Defold 1.13.0 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.13.0 - beta · defold/defold · GitHub


:warning: BREAKING CHANGES :warning:

This is a big release! Not only have we added a lot of exciting features, but we have also done some spring cleaning.

Lua constants + functions

We have removed a lot of old deprecated (and undocumented) functions.
For the most part, it’s about using different Lua module names, but sometimes it’s also using a different function (like go.get()/go.set()).

MIGRATION: The notes below outlines what the old and new constants/functions are.
MIGRATION 2: If you have many projects, you can also use a Python helper script to update your project. As always, backup your project before!

js-web platform is removed

We have removed support for the js-web platform, in favour of fully committing to wasm-web. It follows the wasm support being so widespread today on sites like Poki

MIGRATION: Review any build scripts which uses js-web and change them to use wasm-web instead.

Render primitive Winding Order

We made sure that all our components use the same default winding order. Since the current render script is modeled after OpenGL, we now default to CCW (counter clock wise). If you are using back face culling, you may be affected by this.

MIGRATION: Reverse the back vs front face for the draw calls that don’t show up.

No Collada support

We’ve finally removed our support for the Collada format completely. We are committed to support the glTF format instead.

MIGRATION: If you are using the builtin meshes, like the/builtins/assets/meshes/quad.dae, you will now find an equivalent glTF file in /builtins/assets/meshes/quad.gltf instead.

Model transform fixes

We previously had a “helpful” functionality, where we recentered a model to where the gameobject/component was in the scene. It turned out to be the wrong approach, as the model file may be much more complex than that. In fact, it produced errors for some scenes, and we decided to remove that hidden function completely

MIGRATION:. For the most part, we don’t anticipate users being affected by this. If you are affected, the fix is to move the model appropriately within the gameobject/component.

LiveUpdate cleanup

Removed LiveUpdate auto mount

We’ve finally removed the old auto mount feature. It was buggy, and easy to get stuck in a bad state. So it’s finally removed.

MIGRATION: If you used the game.project setting liveupdate.mount_on_start it means that for each session, you will need to mount the packages you want.

Removed old Livupdate format

We previously supported downloading single assets one-by-one, and adding them to an archive on the device. The archive would only grow, never shrink, and the code was very cumbersome to support.

MIGRATION: Use liveupdate.add_mount() and either mount a zip archive or a folder with single files in it.


Defold 1.13.0

Summary

  • BREAKING CHANGE: (#10667,#10202) Remove the support for LiveUpdate auto mount (by JCash)
  • BREAKING CHANGE: (#11622) Removed support for the js-web (asmjs) build from the engine (by AGulev)
  • BREAKING CHANGE: (#12366) Removed support for old LiveUpdate format (by JCash)
  • BREAKING CHANGE: (#9072,#5666) Component primitive order unification (by Jhonnyg)
  • BREAKING CHANGE: (#10455) Remove deprecated Lua APIs (by ekharkunov)
  • BREAKING CHANGE: (#11749) Removed support for Collada (*.dae) (by AGulev)
  • BREAKING CHANGE: (#12414) Fixes model transform inconsistencies between the editor and runtime for imported glTF/glb models (by Jhonnyg)
  • NEW: (#8753) Added Box2D script functions for joints (by JCash)
  • NEW: (#8024,#3619) Support morph targets for model components (by Jhonnyg)
  • NEW: (#7649) Use Vulkan as the default graphics API on Android (by Jhonnyg)
  • NEW: (#9973) Add render.set_blend_state() for separate blend factors and equations (by nanaktaev)
  • NEW: (#6936) Frustum culling for Particle FX components (by Jhonnyg)
  • NEW: (#7882) Contain the html5 splash image to the canvas (by britzl)
  • NEW: (#3789) Add more shader constants (by Jhonnyg)
  • NEW: (#12158) Allow changing zoom even when a camera component uses Fit or Cover mode (by AGulev)
  • NEW: (#11172) Improved support for Box2d scripting api (by JCash)
  • NEW: (#3790,#10831) Add new graphics script functions (by Jhonnyg)
  • NEW: (#9100) Material and compute script modules (by Jhonnyg)
  • NEW: (#12157,#10963,#10853) Scene view toolbar button popup enhancements (by JosephFerano)
  • NEW: (#12231) Editor camera overlay in scene view (by Jhonnyg)
  • NEW: (#11989) Parallelize directory traversal when syncing resources (by vlaaad)
  • NEW: (#11995) Add /eval endpoint to editor server (by vlaaad)
  • NEW: (#11495) Images supported by the engine now open directly in the editor (by AGulev)
  • NEW: (#12337) Improve /command/clean-build doc and behavior (by vlaaad)
  • NEW: (#12439) Editor: Skip disabled menu items in context menus (by JosephFerano)
  • FIX: (#11015,#5274) Added support for reporting Sdl Guid for connected gamepads (by JCash)
  • FIX: (#12168) Added initial support for running tests on a connected Android device (by JCash)
  • FIX: (#12203) Added support for passing command line arguments to an Android app (by JCash)
  • FIX: (#11470) Do not reset model pose when animation finishes (by britzl)
  • FIX: (#12280) Minimize final engine build sizes for macOS and Android builds (by JCash)
  • FIX: (#12259) Updated to latest SSL certificates (by britzl)
  • FIX: (#3557) Add a LUA reference for constant buffers involved in a render.draw command (by Jhonnyg)
  • FIX: (#12300) Renamed all Lua+LuaJIT symbols to avoid 3rd party symbol clashes (by JCash)
  • FIX: (#11128,#12252) Fixed an issue where equal hashes could behave as if they were not equal in certain cases (by AGulev)
  • FIX: (#8957,#12111) Editor: Prevent editor from making invalid collision shapes (by JosephFerano)
  • FIX: (#12318) Fixed image_null library linker issues. (by JCash)
  • FIX: (#12320) Added endian.h/endian.hpp to dmSdk (by JCash)
  • FIX: (#11387) Symbols for both vanilla wasm and pthread.wasm bundles are now available (by AGulev)
  • FIX: (#12327) Ensure UpdateTransforms runs only after actual transform changes (by AGulev)
  • FIX: (#12338) Fix particlefx crash when playing effects with emitter overrides (by AGulev)
  • FIX: (#12362) Fix sprite component crash (by ekharkunov)
  • FIX: (#12261,#11246,#11024,#7738,#11308) Added fix for scaling dynamic physics objects in Bullet3D (by JCash)
  • FIX: (#12412) Fix gui.set_screen_position() for nodes with scale (by AGulev)
  • FIX: (#11197) Fix Base64Decode to handle input without padding (by singhvishalkr)
  • FIX: (#9446) Add Lua stack index arguments to dmSDK functions LuaToJson and JsonToLua (by britzl)
  • FIX: (#12437) Fix runtime font job teardown crash (by AGulev)
  • FIX: (#12409) Fix HTML5 profiler memory sampling slowdown (by AGulev)
  • FIX: (#12449) Update msvc to 2026 (by ekharkunov)
  • FIX: (#12500) Updated Box2d v3 api with chain an other missing functions (by JCash)
  • FIX: (#12234) Improve the Lua parser to make it less error-prone (by AGulev)
  • FIX: (#11695) Ensure the Editor loads only bundled libraries, ignoring those installed on the system (by AGulev)
  • FIX: (#12224) Editor: Fix manual-size-mode sprite not displaying (by JosephFerano)
  • FIX: (#12253) Unify deps download between editor and bob (by vlaaad)
  • FIX: (#10510) Show error notification when custom editor could not be opened (by vlaaad)
  • FIX: (#8669) Ensure that builds from the editor include the DM_DEBUG define (by AGulev)
  • FIX: (#12365) Resolve game.project resource defaults before rendering the form (by vlaaad)
  • FIX: (#12359) Offload font map generation to a later build phase (by vlaaad)
  • FIX: (#12374) Improve UI responsiveness during builds (by vlaaad)
  • FIX: (#12156) Editor: Fix macOS dialog windows showing in-window menu bars (by JosephFerano)
  • FIX: (#12423) Fix assertion error when deleting last particle emitter (by JosephFerano)
  • FIX: (#12361,#12360,#12226) Editor camera fov slider and bug fixes (by JosephFerano)
  • FIX: (extension-websocket#65) Fix for handling when macOS/iOS blocks while creating a SSL socket (by JCash)

Engine

BREAKING CHANGE: (#10667,#10202) ‘Remove the support for LiveUpdate auto mount’ by JCash
:warning: This removes the deprecated feature of LiveUpdate auto mounts.
From now on, developers must always choose their mounts when starting the game.

Note that the returned mount names now also are hashes (previously strings):

 pprint("MOUNTS", liveupdate.get_mounts())

returns

DEBUG:SCRIPT: MOUNTS,
{ --[[0x119667bf0]]
  1 = { --[[0x119667c50]]
    name = hash: [liveupdate],
    uri = "zip:/device/path/to/acchives/liveupdate.zip",
    priority = 5
  },
  2 = { --[[0x119667d50]]
    name = hash: [_base],
    uri = "archive:build/default/game.dmanifest",
    priority = -10
  }
}

BREAKING CHANGE: (#11622) ‘Removed support for the js-web (asmjs) build from the engine’ by AGulev
In this version, support for the js-web (asmjs) platform in the engine has been removed, as previously announced.

This means bob.jar no longer supports js-web as a platform or architecture. Make sure your build scripts and CI have been updated accordingly.

BREAKING CHANGE: (#12366) ‘Removed support for old LiveUpdate format’ by JCash
:warning: This removes support for our very old mutable LiveUpdate format, which managed individual files and manifests directly.
Going forward, we recommend using our LiveUpdate with “zip” mounts, allowing you to mount your downloaded .zip files.
If individual files are necessary, you can also use the “file” mount type which mounts a folder.

BREAKING CHANGE: (#9072,#5666) ‘Component primitive order unification’ by Jhonnyg
:warning: BREAKING CHANGE :warning:

The vertices for the sprite, gui, tilegrid and particle components are now unified with the rest of the components. The engine is now using counter-clockwise ordering of the vertices so that the normal of the primitive is pointing towards the camera. This means that you can use the same face culling parameters for all components.

Regarding breaking change:
This should only have an impact if you are using face culling for your components. In the default render script, we have enabled backface culling only for models but if your project is using backface culling for other components you might have to switch the front/back face using render.set_cull_face(graphics.FACE_TYPE_BACK). The default cull face mode is FACE_TYPE_BACK, so you can also just remove the render.set_cull_face call

BREAKING CHANGE: (#10455) ‘Remove deprecated Lua APIs’ by ekharkunov
:warning: Removed deprecated Lua APIs and constants. Here a tables for migration:

Old API New API
go.get_scale_vector() go.get_scale()
go.delete_all() go.delete()
camera.acquire_focus() :warning: removed
camera.release_focus() :warning: removed
label.get_text_metrics() resource.get_text_metrics()
model.play() model.play_anim()
model.set_constant() go.set()
physics.set_listener() physics.set_event_listener()
physics.ray_cast() physics.raycast_async()
sprite.set_constant() go.set()
tilemap.set_constant() go.set()
gui.get_text_metrics() resource.get_text_metrics()
gui.get_text_metrics_from_node() resource.get_text_metrics()
render.enable_render_target() render.set_render_target()
render.disable_render_target() render.set_render_target()
render.draw_debug2d() render.draw_debug3d()
vmath.matrix4_from_quat() vmath.matrix4_quat()
sys.get_config() sys.get_config_string()
Old constant New constant
render.STATE_DEPTH_TEST graphics.STATE_DEPTH_TEST
render.STATE_STENCIL_TEST graphics.STATE_STENCIL_TEST
render.STATE_ALPHA_TEST graphics.STATE_ALPHA_TEST
render.STATE_BLEND graphics.STATE_BLEND
render.STATE_CULL_FACE graphics.STATE_CULL_FACE
render.STATE_POLYGON_OFFSET_FILL graphics.STATE_POLYGON_OFFSET_FILL
render.FORMAT_LUMINANCE graphics.TEXTURE_FORMAT_LUMINANCE
render.FORMAT_RGBA graphics.TEXTURE_FORMAT_RGBA
render.FORMAT_DEPTH graphics.TEXTURE_FORMAT_DEPTH
render.FORMAT_STENCIL graphics.TEXTURE_FORMAT_STENCIL
render.RGB graphics.TEXTURE_FORMAT_RGB
render.RGB16F graphics.TEXTURE_FORMAT_RGB16F
render.RGB32F graphics.TEXTURE_FORMAT_RGB32F
render.RGBA16F graphics.TEXTURE_FORMAT_RGBA16F
render.RGBA32F graphics.TEXTURE_FORMAT_RGBA32F
render.R16F graphics.TEXTURE_FORMAT_R16F
render.RG16F graphics.TEXTURE_FORMAT_RG16F
render.R32F graphics.TEXTURE_FORMAT_R32F
render.RG32F graphics.TEXTURE_FORMAT_RG32F
render.FILTER_LINEAR graphics.TEXTURE_FILTER_LINEAR
render.FILTER_NEAREST graphics.TEXTURE_FILTER_NEAREST
render.WRAP_CLAMP_TO_BORDER graphics.TEXTURE_WRAP_CLAMP_TO_BORDER
render.WRAP_CLAMP_TO_EDGE graphics.TEXTURE_WRAP_CLAMP_TO_EDGE
render.WRAP_MIRRORED_REPEAT graphics.TEXTURE_WRAP_MIRRORED_REPEAT
render.WRAP_REPEAT graphics.TEXTURE_WRAP_REPEAT
render.BLEND_ZERO graphics.BLEND_FACTOR_ZERO
render.BLEND_ONE graphics.BLEND_FACTOR_ONE
render.BLEND_SRC_COLOR graphics.BLEND_FACTOR_SRC_COLOR
render.BLEND_ONE_MINUS_SRC_COLOR graphics.BLEND_FACTOR_ONE_MINUS_SRC_COLOR
render.BLEND_DST_COLOR graphics.BLEND_FACTOR_DST_COLOR
render.BLEND_ONE_MINUS_DST_COLOR graphics.BLEND_FACTOR_ONE_MINUS_DST_COLOR
render.BLEND_SRC_ALPHA graphics.BLEND_FACTOR_SRC_ALPHA
render.BLEND_ONE_MINUS_SRC_ALPHA graphics.BLEND_FACTOR_ONE_MINUS_SRC_ALPHA
render.BLEND_DST_ALPHA graphics.BLEND_FACTOR_DST_ALPHA
render.BLEND_ONE_MINUS_DST_ALPHA graphics.BLEND_FACTOR_ONE_MINUS_DST_ALPHA
render.BLEND_SRC_ALPHA_SATURATE graphics.BLEND_FACTOR_SRC_ALPHA_SATURATE
render.BLEND_CONSTANT_COLOR graphics.BLEND_FACTOR_CONSTANT_COLOR
render.BLEND_ONE_MINUS_CONSTANT_COLOR graphics.BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR
render.BLEND_CONSTANT_ALPHA graphics.BLEND_FACTOR_CONSTANT_ALPHA
render.BLEND_ONE_MINUS_CONSTANT_ALPHA graphics.BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA
render.BLEND_EQUATION_ADD graphics.BLEND_EQUATION_ADD
render.BLEND_EQUATION_SUBTRACT graphics.BLEND_EQUATION_SUBTRACT
render.BLEND_EQUATION_REVERSE_SUBTRACT graphics.BLEND_EQUATION_REVERSE_SUBTRACT
render.BLEND_EQUATION_MIN graphics.BLEND_EQUATION_MIN
render.BLEND_EQUATION_MAX graphics.BLEND_EQUATION_MAX
render.COMPARE_FUNC_NEVER graphics.COMPARE_FUNC_NEVER
render.COMPARE_FUNC_LESS graphics.COMPARE_FUNC_LESS
render.COMPARE_FUNC_LEQUAL graphics.COMPARE_FUNC_LEQUAL
render.COMPARE_FUNC_GREATER graphics.COMPARE_FUNC_GREATER
render.COMPARE_FUNC_GEQUAL graphics.COMPARE_FUNC_GEQUAL
render.COMPARE_FUNC_EQUAL graphics.COMPARE_FUNC_EQUAL
render.COMPARE_FUNC_NOTEQUAL graphics.COMPARE_FUNC_NOTEQUAL
render.COMPARE_FUNC_ALWAYS graphics.COMPARE_FUNC_ALWAYS
render.STENCIL_OP_KEEP graphics.STENCIL_OP_KEEP
render.STENCIL_OP_ZERO graphics.STENCIL_OP_ZERO
render.STENCIL_OP_REPLACE graphics.STENCIL_OP_REPLACE
render.STENCIL_OP_INCR graphics.STENCIL_OP_INCR
render.STENCIL_OP_INCR_WRAP graphics.STENCIL_OP_INCR_WRAP
render.STENCIL_OP_DECR graphics.STENCIL_OP_DECR
render.STENCIL_OP_DECR_WRAP graphics.STENCIL_OP_DECR_WRAP
render.STENCIL_OP_INVERT graphics.STENCIL_OP_INVERT
render.FACE_FRONT graphics.FACE_TYPE_FRONT
render.FACE_BACK graphics.FACE_TYPE_BACK
render.FACE_FRONT_AND_BACK graphics.FACE_TYPE_FRONT_AND_BACK
render.BUFFER_COLOR_BIT graphics.BUFFER_TYPE_COLOR0_BIT
render.BUFFER_COLOR0_BIT graphics.BUFFER_TYPE_COLOR0_BIT
render.BUFFER_COLOR1_BIT graphics.BUFFER_TYPE_COLOR1_BIT
render.BUFFER_COLOR2_BIT graphics.BUFFER_TYPE_COLOR2_BIT
render.BUFFER_COLOR3_BIT graphics.BUFFER_TYPE_COLOR3_BIT
render.BUFFER_DEPTH_BIT graphics.BUFFER_TYPE_DEPTH_BIT
render.BUFFER_STENCIL_BIT graphics.BUFFER_TYPE_STENCIL_BIT
resource.TEXTURE_TYPE_2D graphics.TEXTURE_TYPE_2D
resource.TEXTURE_TYPE_CUBE_MAP graphics.TEXTURE_TYPE_CUBE_MAP
resource.TEXTURE_TYPE_2D_ARRAY graphics.TEXTURE_TYPE_2D_ARRAY
resource.TEXTURE_TYPE_IMAGE_2D graphics.TEXTURE_TYPE_IMAGE_2D
resource.BUFFER_TYPE_COLOR0_BIT graphics.BUFFER_TYPE_COLOR0_BIT
resource.BUFFER_TYPE_COLOR1_BIT graphics.BUFFER_TYPE_COLOR1_BIT
resource.BUFFER_TYPE_COLOR2_BIT graphics.BUFFER_TYPE_COLOR2_BIT
resource.BUFFER_TYPE_COLOR3_BIT graphics.BUFFER_TYPE_COLOR3_BIT
resource.BUFFER_TYPE_DEPTH_BIT graphics.BUFFER_TYPE_DEPTH_BIT
resource.BUFFER_TYPE_STENCIL_BIT graphics.BUFFER_TYPE_STENCIL_BIT
resource.TEXTURE_USAGE_FLAG_SAMPLE graphics.TEXTURE_USAGE_FLAG_SAMPLE
resource.TEXTURE_USAGE_FLAG_MEMORYLESS graphics.TEXTURE_USAGE_FLAG_MEMORYLESS
resource.TEXTURE_USAGE_FLAG_STORAGE graphics.TEXTURE_USAGE_FLAG_STORAGE
resource.TEXTURE_FORMAT_LUMINANCE graphics.TEXTURE_FORMAT_LUMINANCE
resource.TEXTURE_FORMAT_RGB graphics.TEXTURE_FORMAT_RGB
resource.TEXTURE_FORMAT_RGBA graphics.TEXTURE_FORMAT_RGBA
resource.TEXTURE_FORMAT_DEPTH graphics.TEXTURE_FORMAT_DEPTH
resource.TEXTURE_FORMAT_STENCIL graphics.TEXTURE_FORMAT_STENCIL
resource.TEXTURE_FORMAT_RGB_PVRTC_2BPPV1 graphics.TEXTURE_FORMAT_RGB_PVRTC_2BPPV1
resource.TEXTURE_FORMAT_RGB_PVRTC_4BPPV1 graphics.TEXTURE_FORMAT_RGB_PVRTC_4BPPV1
resource.TEXTURE_FORMAT_RGBA_PVRTC_2BPPV1 graphics.TEXTURE_FORMAT_RGBA_PVRTC_2BPPV1
resource.TEXTURE_FORMAT_RGBA_PVRTC_4BPPV1 graphics.TEXTURE_FORMAT_RGBA_PVRTC_4BPPV1
resource.TEXTURE_FORMAT_RGB_ETC1 graphics.TEXTURE_FORMAT_RGB_ETC1
resource.TEXTURE_FORMAT_RGBA_ETC2 graphics.TEXTURE_FORMAT_RGBA_ETC2
resource.TEXTURE_FORMAT_RGBA_ASTC_4x4 graphics.TEXTURE_FORMAT_RGBA_ASTC_4x4
resource.TEXTURE_FORMAT_RGB_BC1 graphics.TEXTURE_FORMAT_RGB_BC1
resource.TEXTURE_FORMAT_RGBA_BC3 graphics.TEXTURE_FORMAT_RGBA_BC3
resource.TEXTURE_FORMAT_R_BC4 graphics.TEXTURE_FORMAT_R_BC4
resource.TEXTURE_FORMAT_RG_BC5 graphics.TEXTURE_FORMAT_RG_BC5
resource.TEXTURE_FORMAT_RGBA_BC7 graphics.TEXTURE_FORMAT_RGBA_BC7
resource.TEXTURE_FORMAT_RGB16F graphics.TEXTURE_FORMAT_RGB16F
resource.TEXTURE_FORMAT_RGB32F graphics.TEXTURE_FORMAT_RGB32F
resource.TEXTURE_FORMAT_RGBA16F graphics.TEXTURE_FORMAT_RGBA16F
resource.TEXTURE_FORMAT_RGBA32F graphics.TEXTURE_FORMAT_RGBA32F
resource.TEXTURE_FORMAT_R16F graphics.TEXTURE_FORMAT_R16F
resource.TEXTURE_FORMAT_RG16F graphics.TEXTURE_FORMAT_RG16F
resource.TEXTURE_FORMAT_R32F graphics.TEXTURE_FORMAT_R32F
resource.TEXTURE_FORMAT_RG32F graphics.TEXTURE_FORMAT_RG32F
resource.COMPRESSION_TYPE_DEFAULT graphics.COMPRESSION_TYPE_DEFAULT
resource.COMPRESSION_TYPE_BASIS_UASTC graphics.COMPRESSION_TYPE_BASIS_UASTC

NEW: (#8753) ‘Added Box2D script functions for joints’ by JCash

Box2D v2 Lua Joint API

Added b2d.body.get_joints.

Added b2d.joint functions:

  • destroy
  • get_type
  • get_body_a
  • get_body_b
  • get_local_anchor_a
  • get_local_anchor_b
  • get_anchor_a
  • get_anchor_b
  • is_active
  • get_collide_connected
  • get_reaction_force
  • get_reaction_torque

Added v2 joint creation:

  • create_distance
  • create_mouse
  • create_prismatic
  • create_revolute
  • create_weld
  • create_wheel
  • create_friction
  • create_rope
  • create_pulley
  • create_gear

Added v2 joint property access:

  • set_mouse_target, get_mouse_target
  • set_length, get_length
  • set_frequency, get_frequency
  • set_hertz, get_hertz
  • set_damping_ratio, get_damping_ratio
  • set_spring_damping_ratio, get_spring_damping_ratio
  • get_local_axis_a
  • get_reference_angle
  • get_joint_translation
  • get_joint_speed
  • get_joint_angle
  • enable_limit, is_limit_enabled
  • set_limits, get_lower_limit, get_upper_limit
  • enable_motor, is_motor_enabled
  • set_motor_speed, get_motor_speed
  • set_max_motor_force, get_max_motor_force, get_motor_force
  • set_max_motor_torque, get_max_motor_torque, get_motor_torque
  • set_max_force, get_max_force
  • set_max_torque, get_max_torque
  • set_max_length, get_max_length
  • get_limit_state
  • get_ground_anchor_a, get_ground_anchor_b
  • get_length_a, get_length_b
  • set_ratio, get_ratio
  • get_joint1, get_joint2

Box2D v3 Lua Joint API

Added b2d.body.get_joints.

Added b2d.joint functions:

  • destroy
  • get_type
  • get_body_a
  • get_body_b
  • get_local_anchor_a
  • get_local_anchor_b
  • get_anchor_a
  • get_anchor_b
  • get_collide_connected
  • set_collide_connected
  • wake_bodies
  • get_reaction_force
  • get_reaction_torque

Added v3 joint creation:

  • create_distance
  • create_mouse
  • create_prismatic
  • create_revolute
  • create_weld
  • create_wheel
  • create_motor
  • create_filter

Added v3 joint property access:

  • set_mouse_target, get_mouse_target
  • set_length, get_length
  • enable_spring, is_spring_enabled
  • set_spring_hertz, get_spring_hertz
  • set_hertz, get_hertz
  • set_frequency, get_frequency
  • set_spring_damping_ratio, get_spring_damping_ratio
  • set_damping_ratio, get_damping_ratio
  • set_length_range
  • set_min_length, get_min_length
  • set_max_length, get_max_length
  • get_current_length
  • enable_limit, is_limit_enabled
  • set_limits, get_lower_limit, get_upper_limit
  • enable_motor, is_motor_enabled
  • set_motor_speed, get_motor_speed
  • set_max_motor_force, get_max_motor_force, get_motor_force
  • set_max_motor_torque, get_max_motor_torque, get_motor_torque
  • set_max_force, get_max_force
  • set_max_torque, get_max_torque
  • set_linear_offset, get_linear_offset
  • set_angular_offset, get_angular_offset
  • set_correction_factor, get_correction_factor
  • get_joint_translation
  • get_joint_speed
  • get_joint_angle
  • set_reference_angle, get_reference_angle
  • set_linear_hertz, get_linear_hertz
  • set_linear_damping_ratio, get_linear_damping_ratio
  • set_angular_hertz, get_angular_hertz
  • set_angular_damping_ratio, get_angular_damping_ratio

NEW: (#8024,#3619) ‘Support morph targets for model components’ by Jhonnyg
glTF files with morph / blend target data are now supported for model components in the engine. Two new shader constructs are now exposed that can be used to achieve morph target rendering:

// 1) a uniform / constant that holds the weights
uniform vs_uniforms
{
	vec4 morph_targets_weights;

	// if you need to support more than 4 weights, use an array instead:
	// vec4 morph_targets_weights[x];
};

// 2) an array sampler that holds the morph target data
uniform sampler2DArray morph_targets;

Demo:
morph-target-testing.zip

Future improvements:

  • Instancing - a new vertex attribute semantic is needed
  • Mix skinning and morph animations - currently an animation can drive either a skinned animation or a morph target animation, not both
  • Play multiple morph animations at the same time (also applies to bone animations)

NEW: (#7649) ‘Use Vulkan as the default graphics API on Android’ by Jhonnyg
Android will from now on use Vulkan as the primary graphics adapter and OpenGL as a fallback if Vulkan is not supported on the running device. This can be changed by using an app manifest where you can select either OpenGL+Vulkan (default), only OpenGL or only Vulkan as the primary graphics adapter.

NEW: (#9973) ‘Add render.set_blend_state() for separate blend factors and equations’ by nanaktaev
New render.set_blend_func_separate() and render.set_blend_equation_separate() functions that provide separate control over color and alpha blend factors and equations. This enables advanced blending techniques such as 2D soft shadows (Slembcke technique) that require FUNC_REVERSE_SUBTRACT for the alpha channel while keeping FUNC_ADD for color.

New API:

-- Set separate blend factors for color and alpha channels
render.set_blend_func_separate(source_factor_color, destination_factor_color,
                               source_factor_alpha, destination_factor_alpha)

-- Set separate blend equations for color and alpha channels
render.set_blend_equation_separate(equation_color, equation_alpha)

New constants: graphics.BLEND_EQUATION_ADD, graphics.BLEND_EQUATION_SUBTRACT, graphics.BLEND_EQUATION_REVERSE_SUBTRACT, graphics.BLEND_EQUATION_MIN, graphics.BLEND_EQUATION_MAX.

Fully backwards compatible — existing render.set_blend_func() continues to work identically.

NEW: (#6936) ‘Frustum culling for Particle FX components’ by Jhonnyg
ParticleFX emitters are now subject to frustum culling, either via render.draw or by setting an active camera via render.set_camera.

NEW: (#7882) 'Contain the html5 splash image to the canvas ’ by britzl
The default behaviour of the HTML5 splash image has changed to be contained within the canvas area. It was already configured to be centered in the canvas and set to not repeat, and containing it will likely make sense in the majority of use cases. Should this not be the case it is possible to change by copying the css file from builtins.

NEW: (#3789) ‘Add more shader constants’ by Jhonnyg
New shader constants have been added. These are inverse variants of the already existing matrix constants, and can be used to avoid manually inverting matrices in shaders.

CONSTANT_TYPE_WORLD_INV
CONSTANT_TYPE_VIEW_INV
CONSTANT_TYPE_PROJECTION_INV
CONSTANT_TYPE_VIEWPROJ_INV
CONSTANT_TYPE_WORLDVIEW_INV
CONSTANT_TYPE_WORLDVIEWPROJ
CONSTANT_TYPE_WORLDVIEWPROJ_INV

NEW: (#12158) ‘Allow changing zoom even when a camera component uses Fit or Cover mode’ by AGulev
Now the orthographic zoom set by the user in the editor or via code is applied on top of the automatically calculated zoom, giving more control over the camera. Additionally, a new function get_orthographic_auto_zoom() and a read-only property orthographic_auto_zoom have been added. They return the automatically calculated zoom for Fit or Cover mode.

NEW: (#11172) ‘Improved support for Box2d scripting api’ by JCash
We’ve improved the Box2D V2 scripting, adding support for mass data, fixtures and shape info.
While the full set of features isn’t there just yet, this is a good step forward.

Added for Box2D V2

b2d

  • get_version

b2d.body

  • create_fixture
  • get_transform
  • get_mass_data
  • set_mass_data
  • reset_mass_data
  • get_fixtures
  • destroy_fixture

b2d.fixture

  • get_shape
  • get_type
  • is_sensor
  • set_sensor
  • get_density
  • set_density
  • get_friction
  • set_friction
  • get_restitution
  • set_restitution
  • get_filter_data
  • set_filter_data
  • refilter
  • test_point
  • get_aabb

b2d.shape constants

  • SHAPE_TYPE_CIRCLE
  • SHAPE_TYPE_EDGE
  • SHAPE_TYPE_POLYGON
  • SHAPE_TYPE_BOX
  • SHAPE_TYPE_CHAIN
  • SHAPE_TYPE_GRID

Added for Box2d V3

b2d

  • get_version

b2d.body

  • create_shape
  • get_transform
  • get_inertia
  • get_mass_data
  • set_mass_data
  • reset_mass_data
  • get_shapes
  • destroy_shape
  • is_sleeping_allowed
  • set_sleeping_allowed
  • get_world_center
  • get_local_center
  • get_force

b2d.shape

  • get_shape
  • get_type
  • is_sensor
  • set_sensor
  • get_density
  • set_density
  • get_friction
  • set_friction
  • get_restitution
  • set_restitution
  • get_filter_data
  • set_filter_data
  • refilter
  • test_point
  • get_aabb

b2d.shape constants

  • SHAPE_TYPE_CIRCLE
  • SHAPE_TYPE_CAPSULE
  • SHAPE_TYPE_EDGE
  • SHAPE_TYPE_SEGMENT
  • SHAPE_TYPE_POLYGON
  • SHAPE_TYPE_BOX

NEW: (#3790,#10831) ‘Add new graphics script functions’ by Jhonnyg
New functions have been added to the graphics script module:

-- returns a list of all the available graphics adapters that the engine has been linked with
-- e.g { "directx12", "vulkan", "opengl" }
local adapters = graphics.get_engine_adapters()

-- returns a table of metadata about the graphics API the engine is currently running with
local info = graphics.get_adapter_info()

-- info table contents:
info = {
    family = "vulkan",
    version_major = 1,
    version_minor = 4,
    limits = {
        -- texture limits
        max_texture_size_2d = 16384,
        max_texture_size_3d = 2048,
        max_texture_size_cube = 16384,
        max_texture_array_layers = 2048,
        -- framebuffer limits
        max_framebuffer_width = 16384,
        max_framebuffer_height = 16384,
        max_color_attachments = 8,
        -- per-stage binding limits
        max_samplers_per_stage = 16,
        max_textures_per_stage = 32,
        max_vertex_attributes = 16,
        max_vertex_buffers = 16,
        -- compute limits
        max_compute_workgroup_size_x = 1024,
        max_compute_workgroup_size_y = 1024,
        max_compute_workgroup_size_z = 64,
        max_compute_workgroup_invocations = 1024,
        max_compute_shared_memory_size = 32768,
        -- buffer limits
        max_uniform_buffer_range = 65536,
        max_storage_buffer_range = 134217728,
    },
    features = {
        graphics.CONTEXT_FEATURE_MULTI_TARGET_RENDERING,
        graphics.CONTEXT_FEATURE_TEXTURE_ARRAY,
        graphics.CONTEXT_FEATURE_COMPUTE_SHADER,
        graphics.CONTEXT_FEATURE_STORAGE_BUFFER,
        graphics.CONTEXT_FEATURE_VSYNC,
        graphics.CONTEXT_FEATURE_INSTANCING,
        graphics.CONTEXT_FEATURE_3D_TEXTURES,
        graphics.CONTEXT_FEATURE_ASTC_ARRAY_TEXTURES,
        graphics.CONTEXT_FEATURE_BLEND_EQUATION_MIN_MAX,
        -- only supported features are included in the array
    },
    extensions = {
        "VK_IMG_FORMAT_PVRTC_EXTENSION_NAME",
        "VK_EXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME",
        -- driver-reported extension strings
    },
}

NEW: (#9100) ‘Material and compute script modules’ by Jhonnyg
Two new script modules have been added to the engine: material and compute.

These modules expose runtime inspection and mutation APIs for material and compute resources, making it possible to read and update constants, samplers, textures, and material vertex attributes from Lua.

Added Script Functions

material

Inspect Material Resources

local attributes = material.get_vertex_attributes("/my_material.materialc")
-- attributes contain:
-- {
--     {
--         name = hash("attribute_name"),
--         value = vmath.vector4(...), -- or vmath.vector3, vmath.matrix4, number, or table
--         normalize = false,
--         data_type = graphics.DATA_TYPE_FLOAT,
--         coordinate_space = graphics.COORDINATE_SPACE_WORLD,
--         semantic_type = graphics.SEMANTIC_TYPE_COLOR
--     }
-- }

local samplers = material.get_samplers("/my_material.materialc")
-- samplers contain:
-- {
--     {
--         name = hash("sampler_name"),
--         type = graphics.TEXTURE_TYPE_2D,
--         u_wrap = graphics.TEXTURE_WRAP_REPEAT,
--         v_wrap = graphics.TEXTURE_WRAP_REPEAT,
--         min_filter = graphics.TEXTURE_FILTER_LINEAR,
--         mag_filter = graphics.TEXTURE_FILTER_LINEAR,
--         max_anisotropy = 1
--     }
-- }

local constants = material.get_constants("/my_material.materialc")
-- constants contain:
-- {
--     {
--         name = hash("constant_name"),
--         type = material.CONSTANT_TYPE_USER,
--         value = vmath.vector4(...) -- only for user constants; arrays return a table of values
--     }
-- }

local textures = material.get_textures("/my_material.materialc")
-- textures contain:
-- {
--     {
--         path = hash("/some_texture.texturec"), -- only when resource-backed
--         handle = hash(...),
--         width = 128,
--         height = 128,
--         depth = 1,
--         mipmaps = 1,
--         type = graphics.TEXTURE_TYPE_2D,
--         flags = graphics.TEXTURE_USAGE_FLAG_SAMPLE,
--         page_count = 1
--     }
-- }

Update Material Resources

material.set_vertex_attributes("/my_material.materialc", {
    attribute_name = {
        value = vmath.vector4(1, 0, 0, 1),
        data_type = graphics.DATA_TYPE_FLOAT,
        semantic_type = graphics.SEMANTIC_TYPE_COLOR,
        coordinate_space = graphics.COORDINATE_SPACE_WORLD,
        normalize = false
    },
    attribute_a = { value = vmath.vector4(1, 0, 0, 1) },
    attribute_b = { value = vmath.vector3(0, 1, 0) }
})

material.set_samplers("/my_material.materialc", {
    sampler_name = {
        min_filter = graphics.TEXTURE_FILTER_LINEAR,
        mag_filter = graphics.TEXTURE_FILTER_LINEAR,
        u_wrap = graphics.TEXTURE_WRAP_REPEAT,
        v_wrap = graphics.TEXTURE_WRAP_REPEAT,
        max_anisotropy = 1
    }
})

material.set_constants("/my_material.materialc", {
    constant_name = {
        value = vmath.vector4(1, 2, 3, 4),
        type = material.CONSTANT_TYPE_USER
    }
})

material.set_textures("/my_material.materialc", {
    sampler_name = "/some_texture.texturec"
})

compute

Compute resources expose the same sampler, constant, and texture APIs as materials. They do not expose vertex attribute APIs.

Inspect Compute Resources

local samplers = compute.get_samplers("/my_compute.computec")
-- samplers contain the same shape of data as material.get_samplers()

local constants = compute.get_constants("/my_compute.computec")
-- constants contain the same shape of data as material.get_constants()

local textures = compute.get_textures("/my_compute.computec")
-- textures contain the same shape of data as material.get_textures()

Update Compute Resources

compute.set_samplers("/my_compute.computec", { ... })
-- set sampler data using the same table shape as material.set_samplers()

compute.set_constants("/my_compute.computec", { ... })
-- set constant data using the same table shape as material.set_constants()

compute.set_textures("/my_compute.computec", { ... })
-- set texture data using the same table shape as material.set_textures()

graphics

The PR also exposes additional graphics constants used by these APIs, including vertex attribute data types, vertex semantic types, coordinate spaces, texture usage flags, texture types, texture formats, texture filters, texture wrap modes, and context feature flags.

FIX: (#11015,#5274) ‘Added support for reporting Sdl Guid for connected gamepads’ by JCash

Gamepad identification

This is a first part of updating how our gamepads are identified.
With this update, it’s easier to identify the type of controller that was connected.
The gamepad connected event now also contains:

  • gamepad_guid – the 32 character guid
  • gamepad_guid_info:
Field Description
vendor USB vendor id. E.g. Nintendo 0x057e, Sony 0x054c, or Microsoft 0x045e
product USB product id
bus How device is communicating. E.g.0x0003 for USB devices and 0x0005 for Bluetooth devices.
crc SDL CRC16 signature, typically used when vendor and product ids are unavailable
version The device or firmware version

New macOS/iOS gamepad backend

Also updated macOS/iOS support to use the GameController framework for better support of gamepads (e.g. Switch Pro controller)

Example project: GitHub - defold/example-gamepad: An example to show how gamepads work · GitHub

FIX: (#12168) ‘Added initial support for running tests on a connected Android device’ by JCash

FIX: (#12203) ‘Added support for passing command line arguments to an Android app’ by JCash
This allows you to start an app via adb using extra command line arguments.
It is good for debugging different scenarios without having to build different .apk files for each one.
E.g. for testing different levels in isolation when doing a commit to your CI.

Note: It requires that the application is debuggable

Example of how to launch an app with a different boot collection

adb shell am start \
    -n com.doman.myapp/com.dynamo.android.DefoldActivity \
    -a android.intent.action.MAIN \
    -c android.intent.category.LAUNCHER \
    --esa com.dynamo.android.EXTRA_COMMAND_LINE_ARGUMENTS \
    "--config=bootstrap.main_collection=/main/levels/level1.collectionc"

FIX: (#11470) ‘Do not reset model pose when animation finishes’ by britzl
This change makes sure a model animation stays in the end pose when the animation finishes.

FIX: (#12280) ‘Minimize final engine build sizes for macOS and Android builds’ by JCash
By adding “dead stripping” flags to macOS/Android builds, we manage to make them a little bit smaller:

  • Android:
    • New size: 4362208 bytes
    • -354kb
    • ~7.7% savings
  • macOS:
    • New size: 6708016 bytes
    • -576kb
    • ~8% savings

FIX: (#12259) ‘Updated to latest SSL certificates’ by britzl
Updated builtins/ca-certificates/cacert.pem

FIX: (#3557) ‘Add a LUA reference for constant buffers involved in a render.draw command’ by Jhonnyg
Constant buffers created by render scripts are more robust in terms of garbage collection. Previously, a constant buffer could be deallocated between the render.draw call and its consumption by the renderer.

FIX: (#12300) ‘Renamed all Lua+LuaJIT symbols to avoid 3rd party symbol clashes’ by JCash
This avoids the “duplicate symbol” error that might otherwise arise when building with your own version of Lua or Luau.

Note that you will still use the lua.h/lauxlib.h includes, and the regular function names and types. No changes to your existing extensions are required.

FIX: (#11128,#12252) ‘Fixed an issue where equal hashes could behave as if they were not equal in certain cases’ by AGulev
Fixed an issue where, in certain cases, the Lua garbage collector could cause hashes with the same values to behave as unequal, leading to unexpected bugs that are difficult to debug.

FIX: (#8957,#12111) ‘Editor: Prevent editor from making invalid collision shapes’ by JosephFerano
Collision shape improvements:

  • Scrubbers in the properties UI no longer allow negative dimensions.
  • Manually entered invalid values now cause the build to fail instead of crashing at runtime.
  • Clearer error message when a shape’s computed area is too small due to tiny dimensions and/or scale.

FIX: (#12318) ‘Fixed image_null library linker issues.’ by JCash
This fixes an issue when users tried to remove the image library from their builds.

FIX: (#12320) ‘Added endian.h/endian.hpp to dmSdk’ by JCash

FIX: (#11387) ‘Symbols for both vanilla wasm and pthread.wasm bundles are now available’ by AGulev
Fixed an issue where symbols for wasm and pthread.wasm vanilla builds were not uploaded as part of the engine artifacts during engine builds

FIX: (#12327) ‘Ensure UpdateTransforms runs only after actual transform changes’ by AGulev
Improve game object transform dirty tracking.

Previously script/message updates conservatively marked collection transforms dirty every frame. This changes transform invalidation to happen only when game object transform state actually changes, including direct setters, property writes, animations, parenting changes, bone transforms, and delete/reparent paths.

FIX: (#12338) ‘Fix particlefx crash when playing effects with emitter overrides’ by AGulev
Fixes a crash that could happen when playing particle effects that use runtime emitter overrides for material, image, or animation. Games using overlapping overridden particlefx instances should now continue updating safely.

FIX: (#12362) ‘Fix sprite component crash’ by ekharkunov
Fix crash when disabled sprite components enabled in late_update script function

FIX: (#12261,#11246,#11024,#7738,#11308) ‘Added fix for scaling dynamic physics objects in Bullet3D’ by JCash
The fix is related to correctly keeping the local scaling intact. E.g. for the capsule shape.
Thanks to @a-daniel for the original contribution!

FIX: (#12412) ‘Fix gui.set_screen_position() for nodes with scale’ by AGulev
Fixed an issue where gui.set_screen_position() and gui.screen_to_local() calculated incorrect positions for nodes with scaled parents.

FIX: (#11197) ‘Fix Base64Decode to handle input without padding’ by singhvishalkr
When decoding base64 strings that lack padding characters, dmCrypt::Base64Decode returns nil. This happens because mbedTLS’s base64 decoder strictly requires padding, but many systems (particularly JWT implementations) omit padding per RFC 4648 section 3.2 which states that padding is not always required.

This issue can be observed while using the crypt extension with Nakama’s JWT tokens. The server sends tokens without padding, and the decode fails silently.

The fix adds the missing = characters before passing the input to mbedTLS when the input length is not a multiple of 4. In addition, a test cases covering strings with and without padding was added to prevent regression.

The change should not affect consoles since it only modifies the mbedTLS path.

FIX: (#9446) ‘Add Lua stack index arguments to dmSDK functions LuaToJson and JsonToLua’ by britzl
It is now possible to provide a Lua stack index to the dmSDK function LuaToJson() to specify which stack value to encode, as well as the index at which the option table is located. Previously the default was to always encode the value at stack index 1 and to read the options from index 2, which required workarounds for most use-cases. Also JsonToLua() now has a version which takes the stack index of the options table.

int JsonToLua(lua_State* L, const char* json, size_t json_len, int options_index);
int LuaToJson(lua_State* L, int index, int options_index, char** json, size_t* json_len);

FIX: (#12437) ‘Fix runtime font job teardown crash’ by AGulev
Prevents pending dynamic font glyph jobs from using freed font job data during resource reload or destruction. Adds a regression test for canceling pending dynamic font jobs.

FIX: (#12409) ‘Fix HTML5 profiler memory sampling slowdown’ by AGulev
HTML5 debug builds now avoid expensive detailed memory sampling in automatic profiler output by default. The existing profiler.get_memory_usage() API still returns detailed memory usage, and a new profiler.track_detailed_memory project setting can opt automatic profiler memory reporting back into detailed sampling.

FIX: (#12449) ‘Update msvc to 2026’ by ekharkunov
Current versions:

  • Microsoft Visual Studio 2026 - 14.51.36231
  • WinSDK - 10.0.28000.0

FIX: (#12500) ‘Updated Box2d v3 api with chain an other missing functions’ by JCash
Adds Box2D v3 chain support, typed world/shape handles, and a new b2d.world Lua module.

Box2D v3 added/changed APIs:

  • b2d.body.create_chain
  • b2d.body.is_valid
  • b2d.body.get_name
  • b2d.body.set_name
  • b2d.body.set_target_transform
  • b2d.body.apply_linear_impulse_to_center
  • b2d.body.get_sleep_threshold
  • b2d.body.set_sleep_threshold
  • b2d.body.enable_contact_events
  • b2d.body.enable_hit_events
  • b2d.body.get_contact_data
  • b2d.body.compute_aabb
  • b2d.body.create_shape changed to expose material data
  • b2d.body.get_shapes changed to expose shape_id and material data
  • b2d.chain.destroy
  • b2d.chain.is_valid
  • b2d.chain.get_world
  • b2d.chain.get_segment_count
  • b2d.chain.get_segments
  • b2d.chain.get_geometry
  • b2d.chain.from_shape
  • b2d.chain.get_friction
  • b2d.chain.set_friction
  • b2d.chain.get_restitution
  • b2d.chain.set_restitution
  • b2d.chain.get_material
  • b2d.chain.set_material
  • b2d.shape.SHAPE_TYPE_SEGMENT
  • b2d.shape.get_shape changed to report chain segments as SHAPE_TYPE_SEGMENT
  • b2d.shape.is_valid
  • b2d.shape.get_body
  • b2d.shape.get_world
  • b2d.shape.get_material
  • b2d.shape.set_material
  • b2d.shape.enable_sensor_events
  • b2d.shape.are_sensor_events_enabled
  • b2d.shape.enable_contact_events
  • b2d.shape.are_contact_events_enabled
  • b2d.shape.enable_pre_solve_events
  • b2d.shape.are_pre_solve_events_enabled
  • b2d.shape.enable_hit_events
  • b2d.shape.are_hit_events_enabled
  • b2d.shape.ray_cast
  • b2d.shape.get_contact_capacity
  • b2d.shape.get_contact_data
  • b2d.shape.get_sensor_capacity
  • b2d.shape.get_sensor_overlaps
  • b2d.shape.get_mass_data
  • b2d.shape.get_closest_point
  • b2d.joint.is_valid
  • b2d.joint.get_world
  • b2d.world.is_valid
  • b2d.world.is_locked
  • b2d.world.get_gravity
  • b2d.world.set_gravity
  • b2d.world.enable_sleeping
  • b2d.world.is_sleeping_enabled
  • b2d.world.enable_continuous
  • b2d.world.is_continuous_enabled
  • b2d.world.set_restitution_threshold
  • b2d.world.get_restitution_threshold
  • b2d.world.set_hit_event_threshold
  • b2d.world.get_hit_event_threshold
  • b2d.world.set_maximum_linear_speed
  • b2d.world.get_maximum_linear_speed
  • b2d.world.enable_warm_starting
  • b2d.world.is_warm_starting_enabled
  • b2d.world.get_awake_body_count
  • b2d.world.set_contact_tuning
  • b2d.world.set_joint_tuning
  • b2d.world.get_profile
  • b2d.world.get_counters
  • b2d.world.explode
  • b2d.world.rebuild_static_tree
  • b2d.world.enable_speculative
  • b2d.world.overlap_aabb
  • b2d.world.overlap_shape
  • b2d.world.cast_ray
  • b2d.world.cast_ray_closest
  • b2d.world.cast_shape
  • b2d.world.cast_mover
  • b2d.world.collide_mover

Box2D v2 added APIs:

  • b2d.world.overlap_aabb
  • b2d.world.overlap_shape
  • b2d.world.cast_ray
  • b2d.world.cast_ray_closest
  • b2d.world.cast_shape

See current example: GitHub - JCash/example-box2d: An example how to use Lua scripting with Box2d in Defold · GitHub

Editor

BREAKING CHANGE: (#11749) ‘Removed support for Collada (*.dae)’ by AGulev
:warning: Collada (*.dae) support has been fully removed from the engine. If you are using it in your project, please convert your models to *.gltf/*.glb

BREAKING CHANGE: (#12414) ‘Fixes model transform inconsistencies between the editor and runtime for imported glTF/glb models’ by Jhonnyg

Model re-centering during import :warning: BREAKING CHANGE :warning:

We have removed the automatic model re-centering step from the Bob model import pipeline so imported glTF model positions are not altered. It also adjusts model transform handling so skinned/bone-parented meshes preserve local transforms while rigid meshes keep their flattened world placement. Both of these changes takes Defold closer to a “what you see is what you get” approach for 3D content.

The re-centering means that If your 3D content suddenly changes positions / orientation, this means that the content needs to be modified in an authoring package (e.g Blender) and then re-exported to .glb again. Most projects should be unaffected by this change, but there is a change in behaviour when importing models now in order to fix other incorrectly placed objects.

Editor vs runtime preview inconsitency

The editor preview now mirrors the runtime transform behaviour more closely: models with assigned skeletons use skeleton-relative transforms, while models without skeleton resources use their local model transforms, with bounds updated to match the selected transform path.

Runtime GPU skinning fixes

Runtime rig/model handling was also adjusted so parentless root bones keep the inherited ancestor transform from the imported skeleton, and skinning matrices are only applied when the model is actually animating.

NEW: (#12157,#10963,#10853) ‘Scene view toolbar button popup enhancements’ by JosephFerano
The user experience and feature set were unified between the current three scene view button popups; grid, camera, and scene visibility.

  • Shortcuts can now be assigned to and their binding displayed for camera toggles, while reacting live.
  • Sliders now have a text field showing their current value
  • Better color picker for the grid
  • Scene Visibility now has focus traversal (tab or shift+tab) and is now localized
  • Miscellaneous bug fixes, styling and UX improvements

NEW: (#12231) ‘Editor camera overlay in scene view’ by Jhonnyg
The scene preview window now has an overlay in the bottom of the corner that shows the scene from the currently selected camera component.

Screen Recording 2026-04-16 at 14 27 14 (1)

NEW: (#11989) ‘Parallelize directory traversal when syncing resources’ by vlaaad
This change improves open load time in big projects by 5% (1m12s → 1m08s)

NEW: (#11995) ‘Add /eval endpoint to editor server’ by vlaaad
Now, the editor exposes a local, authenticated /eval endpoint for evaluating Lua code in the editor Lua runtime.

Simplest example:

curl \
  "http://localhost:$(cat .internal/editor.port)/eval" \
  -H "Authorization: Bearer $(cat .internal/editor.token)" \
  --data "print('Hello from Lua') return 1, 'two', true"
# Hello from Lua
# => 1
# => two
# => true

Because /eval can run commands through editor.execute, requests must include the token from .internal/editor.token. This limits access to clients that also have filesystem access.

curl \
  "http://localhost:$(cat .internal/editor.port)/eval" \
  -H "Authorization: Bearer $(cat .internal/editor.token)" \
  --data "editor.execute('git', 'status', '--short', { reload_resources = false })"
#  M game.project

Security is documented in openapi.json, so the only URL your coding agent needs is still http://localhost:$(cat .internal/editor.port)/openapi.json. For example:

› use /eval endpoint and make a short report about the available functionality
• Thinking...
• Short Report

  `/eval` evaluates raw Lua in the Defold editor extension runtime.

  Available runtime functionality includes:

  - Standard Lua globals: `assert`, `pcall`, `load`, `require`, `io`, `os`, 
    `math`, `string`, `table`, `coroutine`, etc.
  - Defold editor API via `editor`, including:
      - resource inspection: `editor.resource_attributes`,
        `editor.properties`, `editor.get`
      - resource/project mutation APIs: `editor.transact`, 
        `editor.tx.set`/`add`/`remove`/`reorder`/`reset`/`clear`, `editor.save`
      - filesystem helpers: `editor.create_directory`, `editor.delete_directory`, 
       `editor.create_resources`
      - external command execution: `editor.execute`
      - browser/file helpers: `editor.browse`, `editor.open_external_file`,
        `editor.external_file_attributes`
      - UI construction/dialog APIs under `editor.ui`
      - preferences via `editor.prefs.get`/`set`/`is_set`
  - HTTP APIs via `http`, including `http.request` and `http.server.route`/`response`
  - Utility modules: `json.encode`/`decode`, `zip.pack`/`unpack`, 
    `zlib.deflate`/`inflate`, `localization`.

NEW: (#11495) ‘Images supported by the engine now open directly in the editor’ by AGulev
The Editor now opens jpg, jpeg, and png images for preview without using external applications.

NEW: (#12337) ‘Improve /command/clean-build doc and behavior’ by vlaaad

NEW: (#12439) ‘Editor: Skip disabled menu items in context menus’ by JosephFerano

FIX: (#12234) ‘Improve the Lua parser to make it less error-prone’ by AGulev
Fix an exception that can occur in the editor while typing go.property()

FIX: (#11695) ‘Ensure the Editor loads only bundled libraries, ignoring those installed on the system’ by AGulev
Fix an issue where the editor could load libraries from /Library/Java/Extensions instead of the bundled ones, which could break loading or otherwise affect the editor.

FIX: (#12224) ‘Editor: Fix manual-size-mode sprite not displaying’ by JosephFerano
Fixed an edge case where if the the size mode was set to manual for a sprite before having selected a default animation, the size wouldn’t get serialized and then the sprite would not render at runtime.

FIX: (#12253) ‘Unify deps download between editor and bob’ by vlaaad
Now, both editor and command-line bob use the same parallelized code to fetch dependencies. Since the editor now also parallelizes deps download, this change comes with an open project time improvement. If a project uses high-speed CDN for serving deps, the perf improvement, as measured on an example large project, is 5% (1m14s->1m10s). For typical, smaller projects that use GitHub for deps download, the improvement can reach 28%, since most of the time is spent on deps checking when opening projects.

FIX: (#10510) ‘Show error notification when custom editor could not be opened’ by vlaaad

FIX: (#8669) ‘Ensure that builds from the editor include the DM_DEBUG define’ by AGulev
Fixed an issue where the DM_DEBUG define did not work in debug builds from the editor.

FIX: (#12365) ‘Resolve game.project resource defaults before rendering the form’ by vlaaad
Some native extensions add project settings with default file references. Opening game.project could crash when those defaults were shown in the editor. These defaults are now handled correctly.

FIX: (#12359) ‘Offload font map generation to a later build phase’ by vlaaad
On large projects with many fonts (that don’t use runtime generation), build times improved by 7-15%.

FIX: (#12374) ‘Improve UI responsiveness during builds’ by vlaaad
This changes improves the build times by around 4% (on an example big project, a test run of clean, warm and hot builds went from 12:27 to 11:59).

FIX: (#12156) ‘Editor: Fix macOS dialog windows showing in-window menu bars’ by JosephFerano
The menu bars no longer show up. Also the native system menu on macOS better reflects what options are available.

FIX: (#12423) ‘Fix assertion error when deleting last particle emitter’ by JosephFerano

FIX: (#12361,#12360,#12226) ‘Editor camera fov slider and bug fixes’ by JosephFerano
Several fixes and improvements related to the new Scene View Free Camera

  • Added new FOV slider to the Scene Toolbar Camera Popup
  • Fixed 2D button not turning off when starting the Free Camera mode
  • Block zooming while holding middle-mouse button to avoid janky behavior
  • Fixed incorrect mouse cursor position when exiting free camera mode
  • Fixed camera matrix inversion related exception
  • Fixed cursor bug with free mode command on macOS

image

Other

FIX: (extension-websocket#65) ‘Fix for handling when macOS/iOS blocks while creating a SSL socket’ by JCash
This fixes an issue when SSL sockets for macOS/iOS would stall for a very long time.

30 Likes

Heh… an error on Windows 11 if the Exclude GLES 2.0 checkbox is not checked in the settings (it’s disabled in the test project):
Cross-compilation of shader type: SHADER_TYPE_VERTEX, to language: LANGUAGE_GLES_SM100 failed, reason: textureSize is not supported in ESSL 100.
Enable the ‘shader.exclude_gles_sm100’ option in game.project if you don’t intend to use this language.

3 Likes

Thanks! I’ll defer to @jhonny.goransson on this one.

1 Like

Thanks! I’ve updated the test project now. The reason it’s happening is because the vertex shader is using the “textureSize” function that isn’t supported on ES2/WebGL1. The editor will cross-compile the shader into all supported shader languages so it’s possible to catch these issues early during development.

If you want it to work in those versions, you will need to adjust the shader to use a uniform instead (and pass it in from a script, or something like that).

5 Likes

In my case ticking the setting ShaderExclude GLES 2.0 in game.project helps in this example:

1 Like

i have a game where the screen size in the global settings is set to 1280 x 720mm (full screen not selected).

In 1.12.4

render.get_window_width() = 1600 render.get_window_height() = 900
render.get_width() = 1280 render.get_height() = 720

window.get_display_scale() = 1.25 (if i selected full screen its 1.00)

So 1600/1.25 = 1280. 900/1.25 = 720

In 1.13

render.get_width() and render.get_height() are still the same but

render.get_window_width() is now 1280 render.get_window_height() is now 720

window.get_display_scale() is still 1.25. (1.00 if full screen)

this result is that gui resizes, the camera zoom is the same but i lose a border off the playable screen. giving the illusion of it being zoomed in. See image. BTW Its fine in full screen mode it just the window mode

4 Likes

Hm, could you open a ticket and ideally add a small repro case (instructions should be fine)? I think I know what might be causing it, but not sure.

2 Likes

Turrican, by the looks of things! Exciting!

Does this mean Defold now supports edge shapes??

3 Likes

It should, via that api!
I don’t think I had it in my example app, but please try it out and see if it doesn’t work!
(I see no reason why it shouldn’t work)

3 Likes

Added on github with a sample project.

2 Likes

Updated a large project and seems everything is working fine.

I attempted to use the Python helper script, it showed me all the api I needed to fix but it didn’t actually do anything. Don’t know if that was intended but it helped regardless.

3 Likes

I’m looking forward to the box2d improvements, but curious,

b2d.shape constants

  • SHAPE_TYPE_CIRCLE

  • SHAPE_TYPE_EDGE

  • SHAPE_TYPE_POLYGON

  • SHAPE_TYPE_BOX

  • SHAPE_TYPE_CHAIN

  • SHAPE_TYPE_GRID

Does this mean we will get more than just circle and box shapes in defold editor?

2 Likes

**This is why I love AI.

I asked both Claude and ChatGPT to review these changes and the impact on my MetroidVania Toolkit I’m building.

Then I take both of their results and give it to the other. And I get results like this:

ChatGPT Codex:**
Claude is mostly right on the broad direction, but his “low migration risk” conclusion is too optimistic.

The biggest miss: this repo still uses APIs that Defold 1.13 removes. The release notes explicitly list these migrations: sprite.set_constant() → go.set(), gui.get_text_metrics_from_node() → resource.get_text_metrics(), sys.get_config() → sys.get_config_string(), and resource.TEXTURE_* constants → graphics.* constants. Source: Defold 1.13.0 beta notes.

Concrete misses I caught:

  • sprite.set_constant() is used in runtime code, not just docs/tests:
    modular_enemy.script (line 214), enemy.script (line 257), parallax_layer_manager.lua (line 148), water_volume.script (line 230), others.

  • gui.get_text_metrics_from_node() is used in toast.gui_script (line 10).

  • sys.get_config() is used in layout editor code:
    controller.lua (line 479), ui.lua (line 62).

  • resource.TEXTURE_TYPE_2D / resource.TEXTURE_FORMAT_RGBA are used in layout_editor/render.lua (line 26), and 1.13 moves those to graphics.*.

So: he is right that render-script render.STATE_* migration is already mostly done, but wrong to imply the deprecated API migration is basically a non-issue.

Other points:

  • His js-web note is fair. The game.appmanifest still has a js-web block at game.appmanifest (line 88). It may be harmless for wasm-web, but any --platform js-web build will fail because bob no longer supports it.

  • His gui.set_screen_position() warning is valid, but incomplete. He found mode_hud; there are also uses in minimap and layout editor UI. The Defold fix affects scaled parents, so visual test HUD, minimap panel, and layout editor overlays.

  • His ParticleFX frustum-culling warning is good. Your render script passes draw options/frustum into particlefx, so edge-of-screen FX should be smoke-tested.

  • His gamepad GUID and Box2D joint take is correct and useful. Those are probably the best post-upgrade feature opportunities for this toolkit.

  • His blend-function note is basically right; the detailed API is render.set_blend_func_separate() / render.set_blend_equation_separate(), even though the summary says render.set_blend_state().

My revised upgrade order would be:

  1. Migrate removed Lua APIs/constants first.

  2. Remove the js-web manifest block.

  3. Run tests.

  4. Smoke-test HUD/minimap/layout editor positioning, particles near screen edges, windowed high-DPI behavior, and Android if relevant.


Claude:
Where ChatGPT was right — and I was wrong

ChatGPT caught four real removals that my first review missed. My initial fetch returned a truncated removal list (only go.get_scale_vector, camera.acquire_focus, label.get_text_metrics, model.play). When I re-queried the notes specifically, the full removal list confirms ChatGPT: sprite.set_constant, gui.get_text_metrics_from_node, and sys.get_config are on the 1.13.0 removal list. And all three are used in your code. That’s a genuine miss on my part — I under-reported the migration surface.

Verified against your repo, the required migrations are real:

Removed API Where you use it Severity
sprite.set_constant() modular_enemy.script:214,248-253, enemy.script:257, water_volume.script:230, death_drop.script:125, particle_emitter.script:93, parallax_controller.script:28, parallax_layer_manager.lua Highest — many call sites
gui.get_text_metrics_from_node() toast.gui_script:10 Medium
sys.get_config() controller.lua:479-480, ui.lua:62-63 Low (editor tool)
resource.TEXTURE_*graphics.* render.lua:26-27 Low (see below)

He also correctly noted: no direct b2d.* usage yet, LiveUpdate/Collada are non-issues, and your render script already uses graphics.* for state constants. Those agree with my review.

Where ChatGPT made mistakes or missed nuance

  1. He missed the pcall vs. bare-call distinction — which is the most important triage fact. Most of your sprite.set_constant calls are wrapped in pcall(sprite.set_constant, ...). When the function is removed it becomes nil, so pcall(nil, ...) returns false instead of crashing — meaning tint/flash effects silently stop working rather than erroring. But modular_enemy.script:248-253 call it bare (no pcall) — those will hard-crash the enemy script. So the real picture is: one hard crash to fix urgently, plus a scattering of silently-broken visual effects. ChatGPT flattened all of these into “replace with go.set()” without flagging that the failure modes differ.

  2. His resource.TEXTURE_* concern is overstated. Your render.lua:26-27 already writes it defensively: resource and resource.TEXTURE_TYPE_2D or hash("texture_type_2d"). If the constant disappears it falls back to the hash literal — it degrades gracefully, no hard break. Still worth tidying, but not a blocker.

  3. File paths are slightly off. He cited layout_editor/render.lua and “the layout editor”; the actual paths are under mvtk/editor/layout_editor/. Minor, but you’d waste a moment finding them.

  4. The windowed/high-DPI regression is unverifiable from the release post itself — that’s a user reply in the thread, not in the notes, so I can’t confirm it from what I fetched. It’s a reasonable thing to test given your high_dpi = 1 and direct render.get_window_width() use, but he presented a single forum comment with more certainty than it warrants. Treat it as “worth smoke-testing,” not a known defect.

  5. Caveat on the removal list itself: both his source and mine are model-summarized beta notes, and beta lists change. Before doing the migration I’d confirm sprite.set_constant’s removal directly in the final notes — its removal would be the single biggest change to your runtime, and beta deprecation lists sometimes get walked back before stable.

Net

ChatGPT did better than my first pass on the removal inventory — that’s the part that matters most for “is it drop-in safe,” and the answer is firmly no, not without migration. I did better on failure-mode nuance (pcall behavior, the defensive resource.TEXTURE_* fallback) and on flagging unverifiable claims. Combine the two: the must-fix-before-upgrade list is sprite.set_constant (start with the bare call in modular_enemy), gui.get_text_metrics_from_node in toast, and sys.get_config in the layout editor.

1 Like

Yes, I use this script to update repositories and remove usage of deprecated APIs. It can be run on a folder, a repository, or even an entire GitHub account (repos will be cloned into a temp folder). When used with --report, it generates an MD file for each repository that lists all outdated APIs and provides links to the documentation for their replacements, including examples of how to use them. For example, the replacement information for gui.text_metrics is different from the one for labels.

As a result, you can either update the project manually or provide the generated MD file to your agent, allowing it to perform the migration automatically using all the information contained in the report.

4 Likes

Alright thanks for explaining that!

First time using one of those.

1 Like

Thanks! I’ve pushed a fix for this to beta, it’ll be available within an hour or so.

3 Likes

The SHAPE_TYPE_EDGE feels interesting. I’d like to give it a try and make an example with it.