City
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this component provides and who consumes it, then delete both comment lines. -->
City
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this component provides and who consumes it, then delete both comment lines. -->TODO: describe this component.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2game.city.City — the city, generated rather than placed. Mounted once, on the scene's `mount_city`. Nothing here is authored by hand: the grid comes from `Core.city`, each block's height, density and character come from its own row in `Core.districts`, and the eight named places come from `Core.landmarks`. Change a number in `game.core` and the city changes. Everything is a box on purpose. A box is a real mesh with a real collider, it costs one entity, and at this scale the difference between a box and a shaped building is polish — which is the pass that follows this one, and which knows exactly where each of these stands because they are named.
rnd(a: number, b: number, c: number, seed: number) → number
A stable pseudo-random The city must be the same city on every load and for every peer: a building that moves between sessions is not a building. Sine-hash, no state.
| arg | type | description |
|---|---|---|
| a | number | |
| b | number | |
| c | number | |
| seed | number |
rndRange(a: number, b: number, c: number, seed: number, lo: number, hi: number) → number
| arg | type | description |
|---|---|---|
| a | number | |
| b | number | |
| c | number | |
| seed | number | |
| lo | number | |
| hi | number |
buildBlock(i: number, j: number, districtKey: string) → number
One block
| arg | type | description |
|---|---|---|
| i | number | |
| j | number | |
| districtKey | string |
buildLandmark(mark: any) → number
The landmarks `Core.landmarks` names the eight places the game depends on. Each stands on its own cell, taller than its neighbours so it can be found by eye, and is named so any slice can reach it with entity.find.
| arg | type | description |
|---|---|---|
| mark | any |
buildAvenues( ) → number
The streets The ground the skeleton laid IS the carriageway. What is added here is what makes a grid navigable by eye: the block pavements above, and a raised strip down the two avenues that carry traffic through the middle of the map.
start( ) → void
Lifecycle
onDestroy( ) → void
stats( ) →
What the city actually built.
landmarkAt(key: string) →
Where a named landmark stands, in world space.
| arg | type | description |
|---|---|---|
| key | string | A key from Core.landmarks. |
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Showing up to 3 levels deep. Open a part to see what it holds further down.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.