ArticleslgStudy

computer science

Defold

Defold is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Defold rather than just read about it. In short: Defold is a cross-platform, free, and source-available game engine developed by King, and later the Defold Foundation. It is used to create mostly two-dimensional (2D) games, but is fully capable of three-dimensional (3D) as well.

Defold — main illustration
Defold — illustration

Key takeaways

  • Defold belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Defold to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Defold from memory before moving on to harder problems.

Reference excerpt

Defold is a cross-platform, free, and source-available game engine developed by King, and later the Defold Foundation. It is used to create mostly two-dimensional (2D) games, but is fully capable of three-dimensional (3D) as well. Defold is a downloadable desktop app, and ships with its own embedded IDE. Defold targets desktop, mobile, and web platforms. Defold is free-to-use and is source-available. Defold has over 30,000 users, and has been used to publish over 100 games. Exported games with Defold can use less than 100kB RAM and very small bundle sizes, less than 2 MB, due to the Engine's modularization and efficient core.

Features Defold uses Lua for scripting, but also allows native extensions, written in C, C++, and target-specific native languages. Defold projects are organized as collections, which consist of a hierarchy of game objects containing in-game entities. Scripting between game objects is handled using the message-passing paradigm, which allows scripts to intercommunicate in call-response and event-based models. Defold's IDE natively supports in-editor Git tracking.

Supported platforms The Defold editor can be run on three platforms and natively supports targeting six major platforms. Defold supports exports for:

Windows (32-bit and 64-bit) macOS (x86_64 and Apple Silicon) Linux HTML (HTML5 and WebAssembly) Android (32-bit and 64-bit) iOS The editor is currently supported on:

Windows (Vista or newer; 64-bit) macOS (11 Big Sur or newer) Ubuntu (18.04 or newer; 64-bit)

Scripting and editor Users communicate with the engine via a Lua API. LuaJIT is used on all platforms except HTML and just-in-time compilation is enabled on permitted platforms. Users can extend the engine using C, C++, Java, Objective-C, and JavaScript for platform-specific or more performant code. In addition, the community maintains TypeScript and Haxe bindings. Scripts are platform-agnostic. The editor includes a visual scene editor, debugger, asset management, tilemap editor, and all templates required for bundling the game. Newer versions support hot-reloading, to make changes to assets and scripts without rebuilding the project.

Rendering The render pipeline can be customized via a render script API, which can be translated into OpenGL, OpenGL ES, Vulkan, or Metal (via MoltenVK) depending on the user's needs. Shaders can be written in GLSL for various post-processing effects.

Engine extensions Defold has support for extensions, which are plugins that extend the engine, where users can integrate auxiliary solutions into their projects. There are libraries for simplifying game systems, interacting with hardware, and integration with third-party software. Both the Defold Foundation and the community host their extensions on the Defold Asset Portal.

History Defold was created in 2008 by Christian Murray and Ragnar Svensson As a side-project while they were working at Avalanche Studios, and later as a full time business before being acquired by King in 2014. Defold was developed and used internally at King for a few years before the decision was made to make Defold available to developers outside of King. The announcement and release of Defold as a free to use game engine was made at the Game Developers Conference in San Francisco in March 2016. Some mobile developers expressed concern about King's long term intentions for the engine, as well as the lack of a clear business goal. Development has continued with bi-weekly incremental releases of the engine and editor, with a major milestone being the release of the new editor in 2017. Defold was nominated for best engine in the 2018 Develop Awards, the 2018 and 2019 Mobile Games Awards. In 2020, the Defold Foundation was established to oversee the development and stewardship of the engine, ensuring its independence from any single entity. In the process, the source code for the engine was made public. King released the source on GitHub as open source game engine, but community of developers questioned the choice of license, as it was initially unclear. Many assumed it was released under an Apache 2.0 - popular open source license. However, King had used a custom license that prevented commercialization of the Defold editor, so that Defold would always remain free for developers to use, calling into question whether it could be considered open source as defined by the Free Software Foundation and the Open Source Initiative.

Licensing

Defold is released under the "Defold License" which is derived from the permissive Apache License, Version 2.0. The engine is "source available" and developers can access the engine's source code on GitHub. The "Defold License" permits any use of the code except for the sale of the Defold engine itself. However, games made with the Defold Engine are unaffected and can be distributed freely without restriction or royalties.

Funding The Defold Foundation is funded entirely by community donations and corporate partnerships. The Defold engine is maintained by both the Defold foundation and open source developers.

References

External links Official website "Defold GitHub repository". on GitHub. 10 April 2022.

Illustrations

Defold illustration

Worked examples

Example 1 — a first encounter with Defold

Start with the simplest possible case. Write down what Defold claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Defold before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Defold ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Defold

In research
Defold appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Defold in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Defold is common in secondary-school and first-year university syllabi. It links to neighbouring topics Cross-platform free software, Free game engines, Game engines for Linux, so understanding it makes those chapters shorter.
In everyday life
Look for Defold outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Defold” →

How to study Defold in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Defold means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Defold out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Defold in simple terms?

Defold is a cross-platform, free, and source-available game engine developed by King, and later the Defold Foundation. It is used to create mostly two-dimensional (2D) games, but is fully capable of three-dimensional (3D) as well.

Why does Defold matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Defold?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Defold.

Tags

  • Cross-platform free software
  • Free game engines
  • Game engines for Linux
  • IOS video game engines
  • Lua (programming language)-scriptable game engines
  • MacOS programming tools
  • Video game development software
  • Video game engines

Keep exploring