game
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->
game
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->TODO: describe this module.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2strict
hopHeight(sticky: number) → number
How high a hop carries on feet carrying `sticky` lute — the number a level's ledge spacing has to answer to. `LW.reach()` is the clean full hop: space ledges under it and the route is climbable on clean feet, over it and the player has to shake first.
| arg | type | description |
|---|---|---|
| sticky | number |
reach( ) → number
hopSpan(sticky: number, rise: number) → number
How far ACROSS a hop carries while still climbing `rise` units — the other half of what a route's spacing has to answer to. A ledge further away than this cannot be reached however well it is aimed.
| arg | type | description |
|---|---|---|
| sticky | number | |
| rise | number |
defaultLevel( ) → Level
A deterministic switchback that the tuned penguin can actually climb: every rise sits inside `LW.reach()` and every sideways step inside `LW.hopSpan()` for that rise, so the route is a rhythm of sidle-and-hop rather than a set of leaps of faith. Two ledges in three overlap the one below — walk into the overlap and hop straight up — and the third is a real gap across. The kind pattern teaches the mechanic in order: rock to stand on, lute to pick stickiness up, ice that only sticky feet hold, then rock to dry off on.
rnd( ) → number
on(name: string, fn: (...any) → void
| arg | type | description |
|---|---|---|
| name | string | |
| fn | (...any |
emit(name: string, ...: any) → void
| arg | type | description |
|---|---|---|
| name | string | |
| ... | any |
sfx(name: string, opts: { [string]: any }?) → void
A one-shot for the sound slice. Any slice calls this; nothing else is needed.
| arg | type | description |
|---|---|---|
| name | string | |
| opts | { [string]: any }? |
level( ) → Level
ledgeUnder(x: number, y: number, drop: number, halfW: number) → Ledge
Queries against the level, shared so the sim, the camera and the dressing agree on what is solid. The highest ledge top at or below `y` (within `drop` below it) that spans x.
| arg | type | description |
|---|---|---|
| x | number | |
| y | number | |
| drop | number | |
| halfW | number |
wallAt(x: number, y: number) → Wall
| arg | type | description |
|---|---|---|
| x | number | |
| y | number |
size( ) → void
u(f: number) → number
| arg | type | description |
|---|---|---|
| f | number |
w(f: number) → number
| arg | type | description |
|---|---|---|
| f | number |
h(f: number) → number
| arg | type | description |
|---|---|---|
| f | number |
portrait( ) → boolean
clamp(v: number, lo: number, hi: number) → number
| arg | type | description |
|---|---|---|
| v | number | |
| lo | number | |
| hi | number |
lerp(a: number, b: number, t: number) → number
| arg | type | description |
|---|---|---|
| a | number | |
| b | number | |
| t | number |
Ledge = { x0: number, x1: number, y: number, kind: string }Wall = { x: number, y0: number, y1: number }Level = {Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
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.