Skip to main content

Module checkpoint

Module checkpoint 

Source
Expand description

Checkpoint system — spatial save points and respawn management.

A Checkpoint is a named point in the world that stores a full WorldSnapshot and a 2D position. The CheckpointManager maintains an ordered list of checkpoints, evicting the oldest ones when the cap is exceeded.

RespawnSystem sits on top of the manager and tracks the “last activated” checkpoint so the game can quickly restore state on player death.

Structs§

Checkpoint
A single checkpoint — a world position plus a saved snapshot.
CheckpointManager
Manages a bounded list of checkpoints.
RespawnEvent
A single respawn event recorded by RespawnSystem.
RespawnSystem
Tracks the active checkpoint and handles player respawning.