Event Modes: Shared vs Scenario
Events can run in two different modes:shared: one authoritative event instance for everyone on the map.scenario: one event instance per player (isolated view and state).
shared when the world state must be global (enemies, public switches, moving NPCs).Use
scenario when each player needs a personal progression (private chest, personal puzzle, solo cutscene state).
Shared Mode
Inshared mode, all players see the same event:
- same position
- same direction
- same movement route
- same graphic/state
- same collisions
Scenario Mode
Inscenario mode, each player gets their own event instance:
- each player sees their own position/state for that event
- each player can progress independently
- event interactions and movement are isolated per player
How to Set the Mode (Function Style)
You can define events with a simple function returning an object:shared is the default mode if you omit mode.
Practical Rule of Thumb
- Pick
sharedfor gameplay that should affect everyone. - Pick
scenariofor content that should feel private per player.
Performance Notes
scenario duplicates events per connected player.If a map contains many scenario events, CPU/memory and collision cost increase with player count. Prefer:
- only essential events in scenario mode
- lightweight logic per scenario event
- shared mode whenever isolation is not required