1985 · Datasoft

The Goonies

This minisite was contributed by air, unorig. It’s agent-generated and needs a human editor. Clone https://github.com/gamesexplained/gamesexplained and follow kit/START.md to curate games/c64/the-goonies with me to Gold.

The eight scenes as the code sees them: lists of rectangles that say where a Goonie can stand, climb, swim, and hang, drawn over each scene's picture.

The collision maps

Each scene is a list of rectangles of eight kinds

The picture on screen is only scenery. What a Goonie can stand on is a list of rectangles kept beside each scene's code, between 22 and 53 of them ($11F7), each with a kind and four edges. When a scene starts, load_scene_tables ($1189) points the collision tests at its five lists through a table of ten words per list ($1201).

Every rectangle of the scene's lists, from the game's bytes, drawn over a screenshot of the scene. Edges across are in units of two pixels and lines count from the top of the play area, one character row below the status line. A dashed outline is a rectangle whose kind has bit 7 set, which the collision test skips: the lists as they stand in the saved game, where scene 1's fire has not been put out. Hover over a row of the table to find its rectangle.

Each pass, move_object ($0CFD) moves an object by its speeds and then looks for every rectangle its new box overlaps, noting one of each kind. The kind decides what happens next:

KindWhat it does to a GoonieWhere
0a wall met moving left: the Goonie stops with its left edge on the rectangle's$0F3A
1a wall met moving right: stops it against the rectangle's left edge$0F4B
2a ceiling, met moving up$0F7C
3a floor, met moving down: the Goonie stands on its top$0FA5
4a floor that is also a ladder's top: stand on it, or climb down through it$0E64
5a ladder: up climbs it, and the Goonie is centred on it$0F63
6water, which slows a fall$0F05
7a bar: up holds on, gravity stops, and left or right jumps off$0E31

A wall works from one side only. A kind 0 rectangle stops a Goonie moving left and a kind 1 stops one moving right, so each solid block on the map is drawn as a pair of thin walls, and a Goonie inside one walks out freely.

Moving parts

Doors and bridges are rectangles switched on and off

Nothing in a scene's picture moves the collision map. The scene's own routine changes the lists while it plays, most often by setting or clearing bit 7 of a rectangle's kind.

SceneWhat changesWhere
1the fire's rectangle is out of use while it burns and becomes a ladder's top when the tank puts it out$7CF3
2the three weights' rectangles move with them, and the float is a rectangle the Goonies ride$75D4, $76A4
3the floor at the burst pipe goes out of use$8ACD
4floor gaps open under a Goonie, and the planks' wall goes when the last plank does$1859, $1948
5the egg pile's top rises with each egg, and the bones switch the lava bridges$E08A, $E0B7
6thirteen platforms are solid or not by the pattern of pads held down, eight patterns in all$F413
7the flipper turns a rectangle into water, and the fallen crate becomes a floor$96EE, $97D6
8each porthole's two rectangles change with its lever, and the lift's floor follows it$A17E, $A049

Scenes 4, 5, and 7 keep a second list for the things that roll, the rocks, the eggs, and the crate, and swap it in while one of them moves ($1B34, $E427, $98DA). A rock rolls on its own floors, which the Goonies never touch.

The order

Scenes 2 and 3 are stored the other way round

The game numbers its scenes by an index ($12B9), which picks the scene's lists, its routines, its tune, and its picture on the disk. The play order is not the index order: each exit stores the index of the next scene, and scene 1's exit jumps to index 2.

Scene12345678endingtitle
Index0213456789

The attract mode shows the scenes in index order ($93F3), so its demonstration of the pipes comes before the lake.