Turn-based Strategy Loop
Posted
by
Djentleman
on Game Development
See other posts from Game Development
or by Djentleman
Published on 2012-10-27T03:50:05Z
Indexed on
2012/10/27
5:18 UTC
Read the original article
Hit count: 444
I'm working on a strategy game. It's turn-based and card-based (think Dominion-style), done in a client, with eventual AI in the works. I've already implemented almost all of the game logic (methods for calculations and suchlike) and I'm starting to work on the actual game loop.
What is the "best" way to implement a game loop in such a game? Should I use a simple "while gameActive" loop that keeps running until gameActive is False, with sections that wait for player input? Or should it be managed through the UI with player actions determining what happens and when?
Any help is appreciated. I'm doing it in Python (for now at least) to get my Python skills up a bit, although the language shouldn't matter for this question.
© Game Development or respective owner