How to implement turn-based game engine?
Posted
by
Dvole
on Game Development
See other posts from Game Development
or by Dvole
Published on 2011-02-07T21:34:06Z
Indexed on
2011/02/07
23:34 UTC
Read the original article
Hit count: 476
Let's imagine game like Heroes of Might and Magic, or Master of Orion, or your turn-based game of choice. What is the game logic behind making next turn? Are there any materials or books to read about the topic? To be specific, let's imagine game loop:
void eventsHandler(); //something that responds to input
void gameLogic(); //something that decides whats going to be output on the screen
void render(); //this function outputs stuff on screen
All those are getting called say 60 times a second. But how turn-based enters here? I might imagine that in gameLogic() there is a function like endTurn() that happens when a player clicks that button, but how do I handle it all? Need insights.
© Game Development or respective owner