Defold
Free, source-available game engine for 2D and 3D games on desktop, mobile, web, and consoles — no royalties, no licensing fees, full source access.
Defold is a free, source-available game engine that lets developers build 2D and 3D games for virtually every major platform from a single codebase. It combines a fully integrated visual editor, Lua-based scripting with a URL-addressed message-passing system, and native C++ performance — all without licensing fees, runtime royalties, or mandatory cloud subscriptions.
The engine ships as a complete, turn-key development environment: an integrated editor (written in Clojure with a JavaFX UI), a content build tool called Bob, cross-platform graphics backends (OpenGL, Vulkan, Metal, DirectX 12), a software sound mixer, Box2D and Bullet 3D physics, and a Live Update system for downloadable content patches. Native extensions let you drop in C/C++ code that the Defold cloud build server compiles for each target platform without requiring a local toolchain per platform.
Defold is actively developed with approximately 115 commits per month, monthly stable releases, and a structured alpha-beta-stable channel that lets teams track pre-release features safely. Platform targets include iOS, Android, macOS, Windows, Linux, HTML5 via Emscripten, PlayStation 4 and 5, Nintendo Switch, Steam, and web gaming platforms such as Poki. The engine is backed by The Defold Foundation and supported by major partners including Poki, Rive, and Heroic Labs.
The open development model means the full engine, editor, and toolchain source live in one repository under the Defold License, a permissive custom license that allows free use including commercial games with no revenue share. Third-party integrations such as Spine animations, TexturePacker atlases, and Tiled maps are available through the Asset Portal.
What You Get
- Integrated Visual Editor - A complete Clojure-based desktop editor with scene hierarchy, tilemap, particle, font, atlas, and animation editors — no external tools required to build a full game.
- Lua Scripting with Message Passing - Game logic written in Lua 5.1 communicates between game objects via a URL-addressed message system, enabling loose coupling and live code reloading during development.
- Multi-Backend Graphics Pipeline - Render backends for OpenGL, Vulkan, Metal, and DirectX 12 let you target modern graphics APIs on each platform without changing game code.
- Native Extensions System - Extend the engine with C/C++ native code; the cloud-based Extender service compiles extensions for every target platform without requiring a local per-platform toolchain.
- Live Update & Hot Reload - Stream updated content to a running game over the network and patch deployed games with downloadable content packages — no full reinstall needed.
- Bob Content Build Tool - A standalone Java-based command-line build tool that compiles game content, bundles assets into archives, and produces platform-specific binaries for CI/CD pipelines.
- Built-in Physics - Integrated Box2D (2D) and Bullet 3D physics engines with Lua script bindings, collision groups, and triggers available from day one.
- Profiler and Debug Services - An in-engine HTTP-based profiler and debug service let you inspect performance counters, memory usage, and game state in a running build.
Common Use Cases
- Indie developers publishing mobile games - Small teams ship 2D mobile games to iOS and Android with zero royalties and built-in IAP, ads, and analytics extension support.
- Web and browser game developers - Studios targeting HTML5 and Poki use Defold’s Emscripten export and compact engine size to deliver fast-loading browser games.
- Educators teaching game development - Bootcamps and universities adopt Defold’s free all-in-one editor to teach Lua scripting, component architecture, and cross-platform thinking without per-seat licensing costs.
- Studios porting to console platforms - Teams migrate existing mobile titles to PlayStation 4/5 and Nintendo Switch using Defold’s unified codebase and platform abstraction layer.
- Developers building Live Update games - Games that need post-release content patches use Defold’s built-in Live Update system to download and apply content without requiring a full app update.
- Plugin and extension authors - C/C++ developers build and publish native extensions on the Asset Portal, adding platform-specific SDKs (push notifications, social APIs, analytics) without forking the engine.
Under The Hood
Architecture Defold is organized as a strictly layered set of C++ libraries, each with documented unidirectional dependency rules: lower-level libraries (dlib, ddf, resource, extension, script) are used by higher-level ones (gameobject, gamesys, render, engine) but never the reverse. The engine entry point drives a simple app-create/engine-loop/app-destroy lifecycle in which the engine can reboot in place for Live Update scenarios. Game objects are modeled as collections of named components (sprite, script, collision, sound, etc.) identified by URL addresses; all inter-object communication uses asynchronous message passing through those URLs, making component coupling explicit and minimal. The editor is a fully separate Clojure application with its own namespace hierarchy of over 200 source files, communicating with the engine runtime and Bob content builder via well-defined interfaces rather than shared engine code.
Tech Stack
The engine runtime is written in C++ with C and Objective-C++ for platform-specific code, targeting OpenGL, Vulkan, Metal, and DirectX 12 graphics backends. Lua 5.1 (with optional LuaJIT) handles game scripting; DDF, a slimmed-down Protobuf variant, defines all asset file formats compiled from .proto schemas into binary archives at build time. The integrated editor is built in Clojure on the JVM using JavaFX/cljfx for the UI and Leiningen for dependency management. Bob, the content build tool, is a standalone Java/Kotlin executable. The build system uses Python waf scripts supplemented by CMake for specific subsystems. Native extensions are compiled by Extender, a cloud build server that receives extension source and SDK headers and returns platform-specific binaries.
Code Quality
The engine codebase has extensive automated testing: over 160 C++ test executables across engine subsystems and 182 Clojure test files covering editor utility modules, with a GitHub Actions CI matrix running tests across platforms. C++ source follows consistent naming conventions documented in CODE_STRUCTURE.md — resource loaders are prefixed res_*, component implementations comp_*, and Lua script modules script_* — making navigation predictable. Inline documentation is abundant, especially in public SDK headers used by native extension authors. Error handling uses both standard C++ assertions for invariants and explicit result codes at subsystem boundaries. Code style guides (CODE_STYLE.md, DESIGN_PHILOSOPHY.md) document expected patterns, and Crowdin integration keeps editor localization synchronized automatically.
What Makes It Unique Defold’s most distinctive technical decision is the URL-based message-passing model for all game object communication, which enforces decoupling at the language level rather than relying on developer discipline. The combination of a free commercial license with no revenue share alongside a cloud-hosted native extension build service removes the usual trade-off between open-source accessibility and platform-specific build complexity. The Live Update system — which allows patches to game content without app store updates — is deeply integrated into the resource and archive format rather than bolted on. The engine’s unusually broad platform support, including server-side console targets like PlayStation and Nintendo Switch compiled through the same native extension pipeline, is enabled by maintaining multiple graphics backends (OpenGL, Vulkan, Metal, DX12) behind a single graphics abstraction layer with no platform-specific leakage into game code.
Self-Hosting
Defold is released under the Defold License version 1.0, a permissive custom license written by The Defold Foundation. It allows free use, modification, and distribution — including in commercial games — with no revenue share, no royalty payments, and no restrictions on the size of the revenue your game generates. You are free to ship commercial titles without notifying or paying the Foundation. The main constraint is that the Defold name and logo are trademarked; you cannot claim your product is officially endorsed or create derivative products called ‘Defold’ without permission. Third-party components bundled in the engine carry their own licenses, documented in COMPLYING_WITH_LICENSES.md with guidance on attribution obligations for shipped games.
Running Defold yourself means owning the full development pipeline: editor installation on each developer machine, managing the Bob content build tool in CI, and if you use native extensions, either relying on the public Defold Extender cloud service or operating your own Extender server. There is no server-side component required for the engine runtime itself — games run entirely on end-user devices. The build system (Python waf and CMake) is well-documented but non-trivial to configure for all target platforms; the README_SETUP.md, README_BUILD.md, and platform-specific guides cover the prerequisites. Console platforms (PlayStation, Nintendo Switch) require separate developer licenses from Sony and Nintendo independent of Defold.
Defold does not offer a paid SaaS tier or managed hosting — the cloud Extender service for native extension compilation is provided free of charge by the Foundation. What you give up versus a commercial engine like Unity or Unreal is enterprise support contracts, guaranteed SLAs, and a managed build farm; what you gain is total cost predictability (zero licensing cost regardless of revenue) and full access to engine source for debugging or modification. The Foundation’s support channels are community forums, Discord, and GitHub Issues; commercial studios typically supplement these with internal expertise.