• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

What to focus on learning for initiative focused turn based strategy game?

T

Toothless

Guest
Im not asking for anyone to spell everything out/write the code, but I would really appreciate getting my focus narrowed! Im learning GMS2 so this may be a very simple problem but Im having trouble working out the logic behind it.

If any of you have ever played tabletop games like Xwing or Battletech, this is basically what I want to do.

Say you have a team of 4 and the enemy has a team of 4.

Each Round starts with an initiative roll. The winning team moves/shoots its first unit. Then the other team goes next, so on and so forth until all units have moved and shot. Round is over, rinse and repeat.

So the logic would be:

Determine if the player goes first or AI
Player or AI uses up its available movement, uses available weapons.
Game switches back and forth between the two.
Returns to the beginning of the cycle if units remain on the board.

What kind of methodology/events are used and what should I be reading about to learn how to execute this eventually? Any code examples are greatly appreciated.
 
T

Toothless

Guest
Oh the finite state machine link is very helpful, thanks!
 
Top