five-on-it / apps/server/src/game-server / WARM_UP
Variable: WARM_UP
constWARM_UP:object
Defined in: apps/server/src/game-server.ts:646
The warm-up of a room's world before its first player (GameServer.warmUp): the physics' first step and the ticks the traffic and the crowd take to come, run as the room opens instead of in the first player's first second. Measured on Riverbend with its game (40 cars, the police, 40 people): the first step 130 to 175 ms (Rapier's broad phase over the city's 8,000 colliders), then a car a tick and a person every two or three, the cars all out by tick 50 and the people by tick 150, steps of 30 to 45 ms among them; after that a step is 5 to 15 ms.
Type Declaration
budgetMs
readonlybudgetMs:25=25
A step under this many milliseconds is quiet: half a snapshot interval, the budget every join's steps are held to (join.integration.test.ts).
maxTicks
readonlymaxTicks:number
The most ticks a warm-up runs: ten seconds of the room's time, three times what Riverbend's full populate takes (150 ticks). A world still not quiet by then (a machine too slow for the budget) opens anyway, its warm-up logged as cut short: a room must open.
quietSteps
readonlyquietSteps:3=SNAPSHOT_EVERY_TICKS
Steps in a row that must be quiet before the warm-up may end: a snapshot interval's worth.
round
readonlyround:30=READOUT_EVERY
The warm-up ends on a multiple of this many ticks (half a second: the readouts' and the Heat's period, a multiple of the snapshots', the missions' and the ice-cream vans'), so every periodic job of the room keeps the phase it has from tick 0: the first snapshot after it comes on its third tick, the first mission step on its sixth, as before.
stallTicks
readonlystallTicks:60=TICK_RATE
Ticks without a new car or person after which the streets are taken as full: a second (a car comes every tick and a person every few while there is room for them in reach of the stand-in; a short road, a level without pavements or a night's share fill sooner).