five-on-it / packages/world/src/checks / LEVEL_BUDGET
Variable: LEVEL_BUDGET
constLEVEL_BUDGET:object
Defined in: packages/world/src/checks.ts:34
What a level may hold at most: a room's server and every client carry all of it. The numbers are what the city that ships needs with room to grow (main-riverbend: 944,000 triangles in 8,000 pieces, drawn in 6 to 10 ms a frame on a mid-range card from 2017 and booted by a server in about 20 s); a region a creator generates is held to a third of them (apps/tools' REGION_BUDGET).
Type Declaration
breakables
readonlybreakables:3000=3_000
Pieces a car knocks loose (each one a body of the simulation when it is): the simulation has 4,096 entities, and the players, the crowd, the traffic and the police need the rest (main-riverbend has 2,064).
groundHalfSize
readonlygroundHalfSize:600=600
Half the side of the ground (m).
placements
readonlyplacements:10000=10_000
Placed pieces.
roads
readonlyroads:256=256
Roads: a city's roads, grid lines, roundabouts' arcs and closed roads' parts, one each (main-riverbend has 86). A road costs by its length more than by its count, and a town's length is held by its size and the junctions' spacing, so a creator's city has room for twice as many shorter ones.
spawns
readonlyspawns:32=32
Spawn points.
triangles
readonlytriangles:1200000=1_200_000
Triangles of every placement together (main-riverbend has 944,000).