Crates
Push crates onto targets — a 2D array is the whole world, and one rule about what may move where creates every puzzle.
Crates is a push puzzle. You can push a crate one square at a time. You can never pull. You can only push one crate, never two. Push a crate into a corner and it is stuck forever.
That is every rule. Three levels, three puzzles, all built from those constraints. The game has no enemies, no timer, no randomness — just you, the crates, and the targets.
This is the eighth and last game in Volume 2 — Patterns of State — and it makes the whole volume's idea literal: the 2D array is the world. Sonar and The Caverns read their worlds; here you read and write one — every wall, floor, target and crate is a number in the grid, and moving, colliding, pushing and winning are all reading and writing that one array. Two things are new: the world is loaded from DATA strings laid out like a map, and the player moves in real time with INKEY$ — no ENTER between moves.
What you will build:
- A warehouse held in a 2D array, loaded from
DATAstrings drawn as a map (the new idea) - A player who moves the instant you press a key, read with
INKEY$(the new idea) - Walls that block movement — a single lookahead into the grid
- The push: a two-cell lookahead that moves a crate only if the space beyond is clear
- Targets, crates-on-targets, and a win when every target is covered
- The finished game: three
DATA-driven levels, a restart key, a move count, and replay
6 units. About 7–9 hours. This builds on Meet BASIC and Volume 1 — earlier games assumed.
Unit roadmap
The warehouse
A 2D array loaded from DATA strings, with a player who moves by INKEY$
The rules
Walls that block, and the one rule that makes the game — pushing crates