Turn Based CombatCombat

Combat resolves in alternating discrete turns; all player actions are fully processed before the enemy acts.

Actions are chosen from a command menu that blocks the game; the hero picks Attack, it resolves, then the enemy AI takes its automatic turn.

How turn based combat works in Godot

No node owns “turns” — it's a state machine. The whole system is which side is allowed to act and when control hands over.

enumprimitive

The phase variable (PLAYER_TURN / RESOLVING / ENEMY_TURN) gates all input. Nothing happens unless the state allows it.

enum Phase { PLAYER, RESOLVING, ENEMY }
var phase = Phase.PLAYER

func on_action(a):
    if phase != Phase.PLAYER: return
    queue_and_resolve(a)

Node (manager)node

A BattleManager queues the chosen action, resolves it fully, then advances the phase. It's the referee that enforces “one side fully acts, then the other.”

func resolve(action):
    phase = Phase.RESOLVING
    await apply(action)        # animate, deal damage
    phase = Phase.ENEMY
    enemy_take_turn()

Signalsprimitive

Emit turn_ended so the UI enables/disables menus in lockstep with the phase, instead of polling state every frame.

signal turn_ended(who)
# UI listens: enable command menu only on PLAYER turn

In short: State machine: PLAYER_TURN / ENEMY_TURN; action is queued, then resolved; UI waits for input before advancing state

Retro games that use turn based combat

26 catalogued game(s) use this mechanic, spanning 1980–1999.

Related combat mechanics

▶ Explore Turn Based Combat interactively — see every game + the Godot system