Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,30 @@ The native shim's ABI is tracked separately by `b2Version()` (currently `4`).

### Added

- **Platformer: the GOO SERPENT in a slime-pool beat + the serpent generalized
(asset-expansion Phase E, continued).** L6's PIT2 spike chasm becomes a **toxic
GOO POOL** (new `pfMakeSlimePool` — a green goo rect over a knockback hurt
sensor, the slime-biome twin of `pfMakeLava`) where a rearing **`snakeSlime`
serpent** rises out of the goo, arcs across and sinks back in, peaking at
jump-arc height so you time your double-jump for when it has sunk (a mistimed
leap or a slip into the goo is a recoverable knockback). The L4 lava serpent's
maker is generalized to `pfMakeSerpent pL,pR,pSurfY,pPeakY,pFrame,pAnim` (tick
`pfTickSerpent`), driving both the lava (`snakeLava`) and goo (`snakeSlime`)
skins from one code path (single-instance — one serpent per level, reset on each
build). Plus two more plain **snake** placements for variety: a meadow snake on
L1 and a sand snake on L5. Self-gates on `gSpooksOK`; static gates clean, audit
0 findings.
- **Platformer: the LAVA SERPENT + a widened L4 lava pit (asset-expansion Phase
E).** L4's old collapsing bridge (which never read right) is **gone**; in its
place the lava pit is widened to a **512px chasm** (2944..3456, up from a 192px
strip) crossed in **two ~160px hops** over a middle **stepping-stone**, and a
rearing **LAVA SERPENT** (`snakeLava` art, bodiless) rises OUT of the lava, arcs
ACROSS it and sinks back in on a sine path, **peaking at the stepping-stone** so
it contests the very rock you must land on (time your hops between its rises).
New `pfMakeLavaSerpent` / `pfTickLavaSerpent`: a pure sprite created BEFORE the
lava tiles so the y576 tile row occludes its submerged lower body (it reads as
rising from / sinking into the lava), with a visibility toggle backing the
`pfMakeSerpent` / `pfTickSerpent` (the generic serpent maker/tick): a pure
sprite created BEFORE the lava tiles so the y576 tile row occludes its submerged
lower body (it reads as rising from / sinking into the lava), with a visibility
toggle backing the
no-tile fallback; the head's strike zone is a proximity-poll knockback (the saw
rule, gotcha 16), never a stomp. The collapsing-bridge maker/tick/globals were
removed wholesale. Self-gates on `gSpooksOK` - absent the spooks sheet the pit is
Expand Down
10 changes: 10 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,16 @@ OXT's compiler is **stricter than LiveCode's**. These are the recurring footguns
real half-height (a build-time global), never a hardcoded constant. The
platformer's brick-smash gap (round 7) was exactly this: an 88px capsule
over a ~76px visible character.
29. **A `constant` must be declared BEFORE its first use, lexically.** OXT resolves
`constant` names by their position in the file, so a handler that references a
constant declared *later* gets an UNRESOLVED name: it compiles with no error,
then evaluates to nothing at runtime, silently zeroing the expression. The L4
lava serpent shipped broken this way — `pfTickLavaSerpent` used `sin(kPI * tP)`
while `kPI` was declared ~900 lines below, so the term collapsed to 0 every
frame and the serpent never rose (it stayed in its "submerged, hidden" branch
forever). Fix: declare the constant above its first use, or inline the literal
value. Distinct from gotcha 6 (constant *values* must be literals) — this is
about the *order* of declaration vs use. (Confirmed in OXT.)

## The single-threaded performance playbook

Expand Down
33 changes: 19 additions & 14 deletions docs/asset-expansion-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,30 +226,35 @@ needs an OXT eye.
`spooks`, via `pfMakeCritter`'s new optional sheet param, `gSpooksOK`-gated) and
the **ring worm** (`worm_ring`, native foes). Phase D essentially complete.

### Phase E — Snakes & the slither biome beat (M) — BEGUN
### Phase E — Snakes & the slither biome beat (M) — DONE (pending OXT)
- **Assets:** `snake(.png)/_walk/_hit/_dead`, `snakeLava*`, `snakeSlime*`.
- **New movement type:** **slither** — a ground crawler that hugs the floor and
reverses at edges/walls (slime-family kind `snake`, animated `_walk`). The LOW
`snake.png` is the crawler; the TALL rearing `snakeLava`/`snakeSlime` art is the
rising **lava serpent** (a separate bodiless mover, not a floor crawler).
- Woven into L4 and the new biomes (no dedicated level needed).
rising **serpent** (a separate bodiless mover, not a floor crawler).
- Woven into L4 (lava), L6 (goo), and across the biomes (no dedicated level needed).
- **Done (pending OXT):**
- The `snake` kind + slither tick (floor-probe edge/wall reversal) +
`pfMakeSnake pIdx,pX,pMinX,pMaxX,pTopY` — the plain low crawler, `gSpooksOK`-
gated, via `pfMakeCritter`'s sheet param. Deployed: L3's ice platform (turns at
the spike pit) and L4's lava-pit approach (turns at the entry pit + lava lip).
- **The "serpent pit" beat (`pfMakeLavaSerpent`/`pfTickLavaSerpent`):** L4's old
collapsing bridge is removed; the lava pit is widened to a 512px chasm crossed
in two hops over a middle stepping-stone, and a rearing `snakeLava` serpent
rises out / arcs across / sinks back in on a sine path, peaking at the stone
(a proximity-poll knockback, the saw rule). Created under the lava tiles so its
submerged body is occluded.
gated, via `pfMakeCritter`'s sheet param. Deployed: L1 meadow, L3 ice, L4
lava-approach, L5 desert — the slither type across four biomes.
- **The serpent (`pfMakeSerpent`/`pfTickSerpent`, generic):** a rearing snake
that rises out of a hazard pool, arcs across on a sine path and sinks back in,
peaking high so it contests the crossing (a proximity-poll knockback, the saw
rule). Created under the pool surface so its submerged body is occluded.
Single-instance (one per level). Two homes:
- **L4 lava** (`snakeLava`): the old collapsing bridge is gone; the pit is a
512px chasm crossed in two hops over a middle stepping-stone the serpent
peaks at.
- **L6 goo** (`snakeSlime`): PIT2's spike chasm becomes a toxic **goo pool**
(`pfMakeSlimePool`, the slime-biome twin of `pfMakeLava`); the serpent peaks
at jump-arc height, so you time the double-jump for when it has sunk.
- **Sprite grounding fix:** the spook skins fill their frames edge-to-edge (no
transparent padding, measured), so their bind offset is the plain geometric
`pFullH/2 - frameH*0.9/2`, not the FOES soft-bottom sink that floated them ~9px.
- **TODO:** a `snakeSlime` home (a slime-pool beat) and more snake placements;
optionally teach `audit-platformer.py` the `pfMakeSnake`/`pfMakeLavaSerpent`
makers (currently ignored — harmless, the pit isn't gap-checked).
- **TODO (optional):** more snake placements if wanted; `audit-platformer.py` now
tracks `pfMakeSlimePool` as a hazard but still ignores `pfMakeSnake`/`pfMakeSerpent`
(harmless — the pools aren't gap-checked and the snakes self-reverse).

### Phase F — Collectibles & a health model (M)
- **Assets:** `coin_bronze/silver(_side)`, `star`, `heart`, `hud_heart(_half/
Expand Down
Loading
Loading