How to create a Godot module to a C++ SDK?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By raccoon
:warning: Old Version Published before Godot 3 was released.

Hi, everyone. I need to make a module for the Game Analytics platform, to use in my Android game, and as it’s the first module I’ll build for Godot I’ve some doubts that may be trivial to someone who already used the Godot’s module creation workflow in other projetcs and things like that. Well, the Game Analytics have a C++ SDK for their platform, it’s hosted on github:

The question: Is the workflow the same as the one in the tutorial from Godot docs?
(This one: Custom modules in C++ — Godot Engine (stable) documentation in English)

What I mean is: if I jump to the registration of the classes I need and configuration of the SCsub and config.py everything should be fine in a perfect world? Or there’s something different I need to do because of the complexity of the SDK and because of the Android templates?

Thanks in advance!

I don’t know how GameAnalytics builds, but the idea is that because a module’s code is blended into Godot, it’s like having Godot as a project, to which you want to add a GameAnalytics dependency.

So it’s mostly about telling SCons to include that. It depends on wether you want to add GameAnalytics as a dynamic library, static library, or directly copy/paste of the code (which is the simplest).

Sorry if it doesn’t helps that much, but that’s the main idea. I’d be curious myself to see how it’s done with libraries having their own build system. You could have a look at existing modules to see how it’s done, eventually :slight_smile:

Zylann | 2017-03-21 13:52

Thank you very much for replying, man. I think I’m going to have to go the way of trial and error on lots of things because of the lack of information and documentation. But now I at least have a direction to start the searches =)

raccoon | 2017-03-28 18:13

if you are creating one instance i would probably add it to register_types.cpp

hungrymonkey | 2018-04-04 21:14