Defold
lastmod 2025-04-21created 2023-09-182 edits
Cross-platform game engine
About
- A lightweight, high-performance, 2D-focused game engine that also supports 3D features
- All game logic is controlled with Lua scripts, and fast builds and hot reload speed up development
- Free of charge, with no license fees or royalties
- Strong cross-platform support: develop once and deploy to many platforms
- Artist-friendly tools such as the scene editor and GUI tools make visual creation easier
- Native extensions in C/C++ and others, plus integration with various SDKs, provide extensibility and production readiness
Key features of Defold
- No installation required: ready to use without installation or setup
- Visual and code editors: creative work through a visual editor and a code editor
- Lua debugger: provides a tool for debugging Lua scripts
- Scene and particle editors: various editors for 2D and 3D game development
- No costs: no upfront costs, license fees, royalties, or runtime fees
Cross-platform support
- Many platforms: games can be deployed to major platforms such as PlayStation, Nintendo Switch, Android, iOS, macOS, Linux, Windows, Steam, HTML5, and Facebook
- No external tools needed: supports all platforms from a single codebase without external tools
Engine design: 2D-focused, 3D-capable
- Defold is optimized for 2D game development but also has built-in 3D features
- Component-based design improves performance and modularity
- 2D components: 2D sprites, Spine models, tilemap editor
- 3D components:
- Loading 3D models and animations
- Creating and modifying 3D meshes at runtime
- Custom materials and GLSL-based shaders
- Particle editor with real-time preview
- Parameter adjustment with a curve editor
- Supports 2D/3D particle emitters
Animation features
- A powerful animation system usable for sprites, models, GUI, and more
- Flipbook animation: used for sprites, GUI nodes, and particles
- Spine and model animation
- Blending support
- Keyframe event handling
- Inverse kinematics available, with script control
- All sprite and GUI properties can be animated
- Custom script-based property animation
- Custom or predefined easing functions
Artist-friendly tools
- GUI editor
- Layering text, image, pie nodes, and more
- Clipping and masking
- Automatic layout and screen orientation switching
- 9-slice textures, bitmap/distance field fonts
- Reusable UI elements using templates
- Visual editor for assembling and placing assets
- Prefab-based game object composition
- Grouping objects in a hierarchy
Physics simulation
- Fully integrated Box2D- and Bullet-based 2D/3D physics engines
- Static/dynamic/kinematic objects
- Shape-based collisions and ray cast detection
- Precise tilemap collision detection
- Triggers, joints, and motors
Everything in Lua scripts
- Lua scripts
- Includes a code editor, syntax highlighting, autocompletion, and LSP
- Built-in debugger with variable inspection
- Fully scriptable rendering pipeline
- Typing available using the Teal language
- Reactive-style Lua support keeps performance high
- Asynchronous communication between game objects
Cross-platform support
- Truly cross-platform
- One-click deployment from the same codebase
- Steam, Facebook Instant, and others supported through extensions
- The editor supports macOS, Windows, and Linux
- Mobile deployment possible without Xcode or Android Studio
- Supports WebGL, OpenGL, Vulkan, and Metal
- Automatic resource management that includes only the assets in use
- Sprite atlas packing
- Per-platform texture compression settings
- Dynamic batching in the render pipeline
Performance and stability
- Much smaller binary size than other engines
- About 10% of the binary size of Unity 6 and Godot 4.3 (on Android, iOS, HTML5, and Windows alike)
- Can render tens of thousands of objects (example: Bunnymark)
- Runs smoothly even on old hardware and mobile browsers
- 4-week release cycle, including a 2-week beta period
- Almost no backward-incompatible changes
- Engine crashes are very rare
Fast workflow
- Hot reload
- Assets/logic applied in real time
- Wireless on-device hot reload and debugging
- Custom reload handling via Lua hooks
- Standalone build pipeline available
- Headless builds integrated with CI
- Libraries can be shared between projects
- Runs an Asset Portal with official and community assets
- All data is managed as text files, making merges easy
- All builds, including HTML5, complete within seconds
- Asynchronous and synchronous loading
- Automatic asset refactoring
- Real-time visual profiler
- Remote web-based frame sampling
- Gameplay video capture
- Native crash log API
Adding features with native extensions
- Defold engine features can be extended with C, C++, ObjectiveC, Java, and JavaScript
- Custom engines are generated automatically in the cloud
- Use cases
- High-performance computation and data processing
- Hardware access, such as mobile cameras
- Integration with external SDKs for ads, analytics, and more
Production use and third-party integration
- Defold is a production game engine with integrations for reliable SDKs
- Push notifications: Google, Apple
- In-app purchases: Google, Apple, Amazon, Facebook
- Game services: Facebook SDK, Google Play, Firebase
- Ads: mediation support for AdMob, IronSource, and others
- Networking: WebSockets, Nakama, PlayFab, Colyseus, and others
- More extensions are available on the Asset Portal
Why Defold?
- Defold does not claim to be the best fit for every game
- But it can be the best choice for some games
- Has particular strengths in development productivity, light weight, cross-platform support, and fast iteration
Hacker News comments
- Defold: cross-platform game engine | Hacker News
- They chose an interesting licensing solution. I like that it is called a source-available license instead of open source
- You can make proprietary changes to the engine without having to publish them (unlike the GPL)
- You can freely monetize games made with the engine, and it guarantees there will be no bait and switch
- The reason it is not Apache 2.0 is that you cannot monetize the game engine itself
- It seems fair and carefully thought out. Kudos to the team
- As I understand it, it started at a game development studio in Sweden (possibly King)
- Console platform build/release tools can cost game developers money, because the platform SDKs themselves impose restrictions
- The Defold organization seems to be making a serious effort to be fair to game developers on licensing and so on
- Other options include MonoGame (Stardew Valley was written with it) and big engines such as Unity and Unreal
- It depends a lot on how much you want to invest in learning, the feature set you want, the trade-offs or platforms you need to consider, and the programming language/style you want to use
- This feels similar. You can tell from the communication and the spirit of the language that the team has something good
- The fact that multi-platform export is currently very comprehensive is a big deal. One of Godot's biggest obstacles was console support
- My only complaint was that it only supports Lua. It would have been more interesting with C#. But at least it is not a full C++ recompile like some engines