First: How exactly are GDJS and GDCore and Gdevelop.JS Connected? I think I understood that Gdevelop.JS is an emscripten build of GDCore used by GDJS.
GDCore = C++ classes representing a complete game structure (from scene to events, objects, behaviors, etc), as well as some “tooling” like the code to generate “real code” from events (this is called a “transpiler”).
GDJS/Runtime and some C++ code to implement things specific to this game engine in the editor (in
GDJS/GDJS). More info in my answer to @Bouh on GitHub.
What are the differences between GDCore and Gdevelop.js (Other than being written in another language of course)
Second: How was the admob extension implemented? In the extension I didn’t saw any direct interraction with the api of AdMob. I heard that it uses a cordova plugin, how does it integrate it?
Admob extension is a “wrapper” (thin “shell”) around this [Cordova plugin]https://github.com/ratson/cordova-plugin-admob-free. Basically, the “AdMob” extension in GDevelop is “just”:
- A declaration of some actions/conditions in this file. The editor is reading this file to know what actions/conditions should be displayed in the editor.
- A JS file that is added to your game. This is calling into the cordova-plugin-admob-free plugin
In other words, the extension is a simple “bridge”, (or “port”, “wrapper”, “shell”…) around cordova-plugin-admob-free (which is itself a “wrapper” around the Android and iOS native code for AdMob) (yes that’s a lot of “bridges”/“wrapper”!)
I heard that it uses a cordova plugin, how does it integrate it?
Right now it’s “hardcoded” in the GDJS generation of your game
I would like to change this C++ code though to allow extensions to describe addition “Cordova plugins” to be installed in a game when the extension is used.