Whats up guys I am new to the android app thing and there one thing that i need to understand. im very familiar with c/c++ and the whole idea that there is a main loop that does stuff like updating rendering and all that. But as i was reading the android developer site i saw that they dont have a main() but rather it seems that the way it switches from task to task is by activities(i think?).
Ill make a simple example so i can show you what im trying to say. Lets say your writing a game (thats what i want to do) and you have the main screen and then you have ur updates for anims, data, and game logic followed by rendering. So how do all these work together? do you just call the startActivity(next state) at the end of each function?? for example
main_menu - if they press start game -->startActivity(newGame)
*game is now running*
Now game is a new activity is guess? that has a main loop which calls the updates and render?
game-->startActivity(update)
then at the end of update it switches back to the game
game then calls its render
go back and do the loop over
Sorry if its so long but if you read it thanks alot and just leave a message that can help me understand this.
Ill make a simple example so i can show you what im trying to say. Lets say your writing a game (thats what i want to do) and you have the main screen and then you have ur updates for anims, data, and game logic followed by rendering. So how do all these work together? do you just call the startActivity(next state) at the end of each function?? for example
main_menu - if they press start game -->startActivity(newGame)
*game is now running*
Now game is a new activity is guess? that has a main loop which calls the updates and render?
game-->startActivity(update)
then at the end of update it switches back to the game
game then calls its render
go back and do the loop over
Sorry if its so long but if you read it thanks alot and just leave a message that can help me understand this.