Home

gamestate

GameState is a term used in game development to describe the consolidated data that defines the current status of a running game. It typically includes global information such as the current score, level or stage, elapsed time, remaining lives or rounds, team compositions, and flags or conditions that affect the entire game world. The GameState serves as a single source of truth that clients in a multiplayer setting can synchronize with, ensuring that all participants have a consistent view of the game’s progress.

In a multiplayer architecture, GameState is usually maintained on the server as the authoritative source of

Unreal Engine provides specific implementations related to this concept. The engine includes the GameState and GameStateBase

Beyond engines, the GameState pattern appears in many architectures as a centralized object or structure that

truth.
Clients
receive
updates
about
changes
to
the
GameState
so
user
interfaces,
AI,
and
gameplay
logic
can
react
accordingly.
This
separation
helps
enforce
rules
and
prevent
desynchronization
between
players.
In
single-player
games,
a
GameState
still
organizes
global
data
and
transitions
between
phases
(such
as
menu,
loading,
in-game,
and
paused)
without
network
replication
concerns.
classes,
which
are
replicated
to
clients
so
they
can
display
up-to-date
information
like
scores,
team
states,
and
match
progress.
In
Unreal,
GameMode
defines
the
game
rules
and
authority
typically
resides
on
the
server,
while
PlayerState
stores
per-player
data.
The
GameState
often
includes
a
replicated
representation
of
the
match
state
(for
example,
WaitingToStart,
InProgress,
Paused,
or
Finished)
that
clients
observe
to
adjust
UI
and
behavior.
captures
global
game
information,
supports
persistence
across
sessions,
and
coordinates
state
transitions
throughout
gameplay.