Skip to content

Latest commit

 

History

History
54 lines (44 loc) · 1.41 KB

turn-state-machine.md

File metadata and controls

54 lines (44 loc) · 1.41 KB

Turn State Machine Example for Unity Multiplayer

A turn state machine provides a structured way to control the different stages of a turn-based multiplayer game.

Instead of allowing actions at any time, the game can move through predefined states such as waiting for a player, rolling the dice, selecting an action, processing the action, and ending the turn.


📑 Table of Contents


What Is a Turn State Machine?

A turn state machine divides gameplay into clearly defined states.

For example:

WaitingForPlayer
       |
       v
StartTurn
       |
       v
RollDice
       |
       v
ChooseAction
       |
       v
ProcessAction
       |
       v
EndTurn
       |
       v
StartTurn