Hello,
I am not sure if this is right place to post, but question is rather simple, so i think it goes well here.
Maybe someone has some sort of schema or could explain Android application life cycle?
When making a game, I use standard cycle
Loop begin
Input
Logic
Output
Loop end
Problem i stumbled upon is that Android apps starts with activity and later on, magic happens.
GLViewSurface (or something along those lines) draws whenever he wants and thus i have to write manual checks in frame drawing function, it was called "onFrameDraw" if am right. And input handling acts on his own in activity. So in the end i had to write some additional classes to split these layers, but one problem remains.
It goes something along these lines
public void onFrameDraw()
{
if (CheckIfFPSAllowsMeToDoSomethingNow())
{
handleInputEvents();
handleLogics();
feelFreeToDrawStuff();
}
}
It's not that i mind it, but i don't think its appropriate to call input event handling and logic from context of drawing method.
Maybe someone has any tips or any schema on that matter?