Does the game engine allow me to intergarte native android code

122 views Asked by At

I am looking into using Game Engine for one of my apps. I have been android developer for a while but never used a game engine. I know the most famous engines out there are AndEngine, Libgdx and Unity Which engine would allow me to use the native android code along with the engine? for example, I want to create one screen using Xmls and Native android ( main menu) and when the "start game " button is clicked, I want to open another screen/activity which runs the game using game engine.

Is this possible in any of them?

A lot of game engines limit you to using their "cluster" and I don't want to be limited as I was to use some hardware features and use native Android code. Thus my concern

2

There are 2 answers

1
Łukasz Motyczka On BEST ANSWER

It is possible in andEngine to start andEngien activity from basic android activity and the other way: to start normal android activity from andEngine game. You can find examples on StackOverflow. Try to search for "Trouble launching Andengine Activity from OnClickListener" (Sorry, cant paste links right now). Also, isn't it easier to just make butons in andEngine too? there is even class for that....

0
TomGrill Games On

libGDX allows you to use Android specific code by interfacing.

See this link: https://github.com/libgdx/libgdx/wiki/Interfacing-with-platform-specific-code

F.e. you can open an Android Dialog which will look like depending on which Android API is installed on the target device.