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.

What the player does: two Goonies who take turns at the joystick, a jump that rises ten lines, eight scenes each solved by teamwork, and an ending that starts the game again.

The two Goonies

Fire swaps which Goonie is the player

Every scene starts with two Goonies, the first two of the eleven object slots the game keeps in zero page. Each pass the game runs every slot's behaviour routine by the slot's type ($0A80), and the two Goonies differ only in their types.

Type 1 is the Goonie under control: its routine reads the joystick and moves it ($0AF9). Type 2 is the one waiting, which gets "nothing pressed" every pass and so stands still, or falls if it was left in mid-air ($0B62). Pressing fire swaps the two slots' types, so the stick passes from one Goonie to the other where each stands.

With two players, set by F3 on the title, the waiting Goonie's routine reads the joystick in port 2 instead ($0BA9), and both Goonies move at once. The Controls tab has the rest.

Moving

A jump rises ten lines in four passes

The game moves everything once a pass, and a pass is four frames, 12.5 a second on a PAL machine ($08D6). A Goonie walks two units a pass, four pixels. Pushing up while standing on a floor starts a jump: move_object ($0CFD) sets the speed upwards to five lines, and gravity takes one line off it every pass, down to a fall of four.

Pass12345678910
Line1029895939292939598102
Speed down−4−3−2−1012340

A Goonie's line and speed at the start of each pass, from the moment up is pushed, recorded on the kit's 6502 machine running the game's own code from a saved moment of play. The first step is four lines, not five: gravity is applied in the same pass the jump begins.

With left or right held, the same jump moves two units across each pass. A Goonie that walks off an edge falls the same way, one line faster each pass up to four, and no fall is too high: every one of the eighteen instructions that start a death is in a scene's hazard or a creature's routine, none in the movement code.

Up is also the climb on a ladder and the grip on a bar. The scenes are built of rectangles of eight kinds, floors, walls, ladders, water, and bars to hang from, and the Maps tab draws every scene's rectangles over its picture.

The scenes

Every scene needs both Goonies at the exit

Each scene's exit routine waits until both Goonies stand in the exit, then adds 1,000 points and starts the next scene. Getting there takes a task for each Goonie. The table says what each scene's own code tests for.

Scene 1, the Fratellis' hideout
1 · The hideout
Scene 2, the cavern lake
2 · The cavern lake
Scene 3, the pipes
3 · The pipes
Scene 4, the rolling rocks
4 · The rolling rocks
Scene 5, the bird, the eggs, and the lava
5 · The bird and the eggs
Scene 6, the cage
6 · The cage
Scene 7, the octopus
7 · The octopus
Scene 8, the pirate ship
8 · The pirate ship
SceneWhat opens the wayWhat kills a Goonie
1 · The hideoutOne Goonie works the money press on the top floor ($7D41), and Mama Fratelli walks off after the falling banknotes ($7B09). The other jumps into the water tank from below until it tips over and puts out the fire ($7E6C), which turns the fireplace into a way down ($7CF3) to the exit ($8013). A crate on the top floor can be pushed ($7C05).Mama Fratelli
2 · The cavern lakeA Goonie takes the key ($774E), crossing the lake on the float, which moves when a Goonie walks into it ($76A4); the door at the lower left opens once the key is taken ($763F).the lake, three weights that drop onto the top ledge and their drips ($75D4), and a flier on a set path
3 · The pipesEach Goonie closes a vent by touching it; with the two that matter closed, the pipe bursts and opens the exit ($8E53).the gunman on the right, who fires along a Goonie's row ($8AEA), an acid drop that slides along the ceiling and falls ($8CBD), and the jets from open vents
4 · The rolling rocksA Goonie standing on a floor under the chain opens that floor's gaps, so a rolling rock drops through ($17A3); a Goonie on the skid in the cellar swings the flap that sends it to the lever ($1979). Each rock on the lever takes away a plank, and with three gone the tunnel is open ($1948).the five bats the bell releases each time it rings ($18E9)
5 · The bird and the eggsThe bird drops eggs ($8845), and the Goonies push five onto the pile at the lower right ($E33C), which they climb to the exit. Hanging from a bone opens or shuts a lava bridge ($E0B7); tunnels join the rooms ($E17A).the bird, lava under an open bridge, and a creature that hatches from an egg left too long ($E539)
6 · The cageThree pads decide which of thirteen platforms are solid, through eight patterns ($F413). Hanging from either lever opens the door's passage ($F32B).nine drips from the ceiling ($F23D) and the lava along the bottom
7 · The octopusA Goonie knocks the crate off its ledge ($97D6), and it is pushed under the flipper lever. With the lever held down, a Goonie pulls the pond's plug ($96EE), the pond drains, and the octopus sinks out of the way ($962A).the octopus's tentacles, a spot by the pond ($95CE), and fliers
8 · The pirate shipFour levers open three portholes ($A0B6), a lift by the mast carries a Goonie up ($A049), and pushing the chest on the top deck spills coins into the sea ($9F0B). Mama Fratelli follows the coins and falls in ($9DEB). The exit is by the chest ($9DBE).Mama Fratelli while she guards the hold ($9E62), and the water below the ship

The C64-Wiki's walkthrough says scene 8's tasks are fixed to one Goonie each.1 No routine in scene 8 asks which Goonie it is: the levers, the lift, and the chest take either. The two Goonies do differ in this scene alone. Its start routine draws the second Goonie from other shapes ($9D63), a figure about three lines taller than the children of the other scenes. Whether that height keeps it from a task, through the scene's rectangles, has not been checked.

Points

Most of the score comes from the ending

The score is six decimal digits ($12A7), and every award in the game goes through one routine, add_score ($852C), which does nothing during the attract mode. These are all of its callers.

PointsFor
1,000both Goonies at a scene's exit, eight times a round
5,000 × (lives + 1)reaching the ending ($A4E1)
500scene 7: pulling the pond's plug
200scene 1: the crate's first push; scene 2: the key; scene 3: bursting the pipe
100scene 1: the press's first use, and each step a Goonie tips the tank; scene 8: Mama Fratelli in the water
50scene 5: an egg onto the pile; scene 7: knocking the crate off its ledge
35scene 4: a rock on the plank lever, while planks remain

The ending's bonus counts the lives left and one more, so a round finished with no deaths and five lives pays 30,000, against 8,000 for the eight exits. The C64-Wiki gives 5,000 for each Goonie left;1 the loop at $A4E6 runs once more than the lives. The ending entered with five lives and no score showed SCORE 30000.

Lives

A death restarts the scene but keeps the work done

A Goonie that dies shows two frames for sixteen passes, then a life goes and the scene starts again ($0BD3). A game starts with five lives ($0868), finishing scene 4 adds three, up to nine ($181B), and losing a life with none left ends the game.

A restart runs the scene's start routine with a flag that says it is a restart ($12BA), and six scenes use it to keep what was done:

SceneKept after a death
1 · The hideoutthe tank, once it has begun to tip, and the fire it put out
2 · The cavern lakethe key, once taken
3 · The pipesthe vents already closed
4 · The rolling rocksthe planks already gone, and the bell's count
5 · The bird and the eggsthe eggs on the pile
7 · The octopusthe crate, once fallen, and the drained pond

Scenes 6 and 8 never look at the flag, so a death there starts them from scratch: the ship's chest goes back to the start of the deck.

The ending

Secret: the ending starts the game again, and pays its bonus again

After scene 8 the ship sails across the screen. When it reaches the right ($A4F8), the game sets the scene to 0, scene 1, and enters it the way an exit enters the next scene. The score and the lives are left as they were.

Scene 1 again after the ending, with SCORE 30000 and LIVES 5
Scene 1 straight after the ending, still with the ending's 30,000 points and five lives.

So the game has no end. Each round pays the exits again and the ending's bonus again, and scene 4 adds three lives each time, up to nine. A round with no deaths that starts with nine lives ends with a bonus of 50,000. The six digits go back to 000000 after 999,999: add_score drops the carry out of the top digit.