Files
systemic-game-design-course/course/08-push-chains/expansion
Lucas WintherandClaude Opus 5.5 bd80cefbef feat: module 08 push chains
Movement planned in full, then committed: a Planner builds a plan
(moving and destroyed ids) by running content's movement responses
(OPEN/SHUT, PUSH, STOP) for every step, rolling back failed branches.
Edge of level blocks; YOU objects move furthest-ahead first; rules are
reparsed once after movement. Harness: move/move_dir(Dir), posOf,
kindsAt. Expansion Drop: PULL as one word plus one content response.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 04:05:42 +01:00
..
2026-10-29 04:05:42 +01:00
2026-10-29 04:05:42 +01:00
2026-10-29 04:05:42 +01:00

Module 8 Expansion Drop: PULL

The lesson's Expansion Drop beat explains the task. This file holds the scenario, the test locations and the check.

  • Word: PULL, a property. From the Baba Is You Wiki's PULL page (recorded in docs/research/baba-is-you.md §5): "PULL is a Property that makes an object pullable by any moving object. PULL also makes the object "solid" for collision checks like STOP does.", and "If something directly adjacent from a PULL object moves away from it, the PULL object will try to move in the same direction."
  • Tests: tests/rust/test_08x.rs and tests/ts/test_08x.test.ts. Copy the one for your track into your workspace's tests/.
  • Reference answer, one change in data and one in content code:
    • solution/words.json, one file for both tracks: the Module 8 reference's src/content/words.json with one entry added, { "name": "PULL", "role": "property" }.
    • solution/rust/src/content/movement.rs and solution/ts/src/content/movement.ts: the Module 8 reference's movement responses with one response added, pull, listed after push.
    • Nothing under src/engine/ changes, and neither does the harness. PULL is a new behaviour, so it is new code, but it is a response the engine's planner runs like any other: the planner already lets a response look at any tile and ask for any object to move.
  • Check: commit your workspace before you start, then run node tools/expansion-check.mjs <your-workspace> <that-commit> from the course repository. It fails if any file under src/engine/ changed.

The reference lets a PULL object that can't follow stay behind without stopping the mover. The PULL page doesn't say what happens then, and this test doesn't check it.

Scenario

test_08x_pull_follows

  • Setup: newBaba with an empty level 5 wide and 3 high. Place BABA (0,0) IS (1,0) YOU (2,0) and ROCK (0,1) IS (1,1) PULL (2,1). Place an object rock at (0,2) (the far rock), an object rock at (1,2) (the near rock) and an object baba at (2,2).
  • Action 1: move("right").
  • Assertions 1: posOf(baba) is (3,2), the near rock is at (2,2) and the far rock at (1,2). Baba moved away from the near rock, so it followed; the near rock moved away from the far rock, so that one followed too.
  • Action 2: move("left").
  • Assertions 2: nothing moved: Baba is still at (3,2), the near rock at (2,2) and the far rock at (1,2). A PULL object is solid: Baba can't step onto it, and PULL doesn't push.

Before the drop the lexicon doesn't know PULL, so ROCK IS PULL spells nothing: Baba walks away from the rocks, and in the second move walks back onto the near rock's tile.