Skip to content

five-on-it / packages/sim/src/world

packages/sim/src/world ​

The simulation world: a Rapier physics world built from the level's static geometry, a bitECS world with the component arrays, and the sidecars (bodies, controllers, colliders, joints) Rapier objects live in. Everything that randomises (shot spread, pedestrians) draws from the world's own seeded generator, so two worlds fed the same inputs stay identical. The world also holds the game's rules the simulation applies (whether players may hurt each other, which decides who may be carjacked; what the garages charge), the players' stored cars and Cash, the shops' stock, the level's vehicle spawners, where players come back after going down, the room clock and its weather.

Interfaces ​

Type Aliases ​

Variables ​

Functions ​