Search code examples
androidandroid-activitygame-developmentgodot

Use Godot game as an Activity or Fragment in a larger Android Studio application


I have been making a game for a while in Android Studio, using just plain Android features like Drawable-s and such for the visuals.

I am planning to add change/update some things and I think that would be easier to do with Godot, but I want to keep the rest of the application in Android Studio.

Is it possible to make something in Godot and export/integrate that into an Android Studio project? Maybe as a separate Activity or Fragment?

If not possible in Godot, is it possible in some other similar game engine?


Solution

  • It seems it is indeed possible to do this in Godot (github discussion), but there is no documentation for it yet (github discussion).

    However I discovered it is possible to run LibGDX code in a fragment of an activity (wiki page). I ended up doing it with LibGDX both because I found it to have less of a learning curve from my experience, and it would still be part of the android application and I could pass callbacks and other Java objects back and forth between the Android specific features and LibGDX game logic.