What does Defold compile to on iOS & Android?

Hello,
I am trying to understand what the Game compiles to or is built as on Android & iOS once you build the bundle, i.e how is cross platform achieved?

Is it a webview and it runs as html/javascript?

I it like ReactNative with a JS engine and native UI or does it build to Java/Bytecode on Android & ObjC/machine code on iOS?

1 Like

The Defold engine core is written in a mix of C and C++. This makes it very portable across platforms. On top of the shared core of code we have additional native code to interface with the capabilities of the target platform. On Android we have some Java classes, on iOS there’s Objective C. On the web we use Emscripten to transpile/convert the entire C/C++ code base into Javascript where we add some extra Javascript to interact with the browser APIs. This means that for each target platform Defold is running as a native application according to the best practices of the specific platform.

And in all these cases the resulting native binary application includes a Lua VM (Lua 5.1 or LuaJIT) which runs your game logic.

13 Likes

Thank you!

2 Likes