New to Spectrum Arcade: Gold Top Grand Prix
Race Dot Dawson's milk float against three rival milkies round eight circuits of Pennyford at dawn, and spend your gold tops at the Dairy Depot. Here's how we made it.
There's a new cabinet in the Spectrum Arcade, and it's our first racing game. Gold Top Grand Prix puts you behind the wheel of an electric milk float. Dot Dawson's float, the Gold Top, races three rival milkies round eight circuits in the town of Pennyford at dawn, four floats on one screen at a time. It runs on the ZX Spectrum 48K and 128K, and it's out now: play it in your browser in Specz, our emulator, or load the tape on a real Spectrum.
Below, we explain where the idea came from, the choices we made, how we built and tested it, and how to win. To start, press Play on the cabinet, or open it straight in Specz at spectrumarcade.com/arcade/play.html#gold.
The idea
Every new game in the arcade has to be a kind of game we haven't made yet. We already had platformers, shooters, a pinball table, a falling-block puzzle and a gravity cave flyer, but nothing with a steering wheel. Racing was the clearest gap, so this time it was the first question we asked. We also had a choice to make between two kinds of racer: a long road that scrolls past you, or a whole circuit on one screen seen from above. We went for the second. You see every float at once, nobody comes at you out of nowhere, and on a phone the whole race fits on the screen.
For the theme we wanted something fast-ish, British and a little bit silly, and the milk float won easily over the other ideas on the table (racing lawnmowers at a village fete, and soapbox carts down a seaside hill). A milk float is slow, electric and very much of the early 1980s, which makes the idea of a grand prix for them funny on its own. It also gave us a lot of the game for free. The bottle tops of the time came in different colours, so each float got its own: Dot drives the gold top, Sid the green, Ron the red and Bev the blue. Gold tops became the thing you pick up off the road. And because milk floats are electric, there's no engine noise to fake, so the beeper is free for tyre squeals, knocks and the clink of a bottle top.
The game plays like the classic overhead arcade racers, four cars on one screen with turn-and-drive steering, without reusing their names, cars, tracks, artwork or sounds. Dot, her rivals, Pennyford and its eight circuits, the Dairy Depot, the title, the lettering and the music are all our own.
Designing it
We start every new game with two short rounds of questions: first the game itself, then how it should feel. The answers here were a racer for both the 48K and the 128K, the usual controls (keys you can redefine, the cursor keys and a joystick), and a classic arcade difficulty curve: a fair first round, then quicker rivals and new hazards as you go.
The extras we chose shaped most of the design.
- Rounds and lives. Finish first or second to qualify for the next round. Finish third or fourth and it costs you a float, and you race the same round again. That keeps every race worth fighting to the line.
- Pick-ups and upgrades. Gold tops and pints of milk appear on the road during each race. Between rounds you stop at the Dairy Depot and spend your gold tops on top speed, pick-up (how fast you get going) and grip (how sharply you turn and how well you hold the road).
- An attract demo and AY music. Leave the title alone and the computer drives a race on a different circuit each time; on the 128K there's music on the AY sound chip.
The eight circuits each add one thing, so a new hazard never arrives on top of another:
| Round | Circuit | What's new |
|---|---|---|
| 1 | High Street | The basics, round a block of shops |
| 2 | Station Road | A loop up and round the station |
| 3 | The Rec | Narrow park lanes, grass verges, spilt milk |
| 4 | Church Lane | A dog that runs across the road |
| 5 | Market Square | Traffic cones |
| 6 | The Prom | A long run along the seafront |
| 7 | Hill Estate | Spilt milk all over the estate |
| 8 | The Dairy | Everything, and two dogs |
After round 8 you go round all eight again, and the rivals are quicker each time. The hardest trade-off was the road width. Four floats side by side need a lot of room, and a whole circuit has to fit in 32 by 22 character cells, so the town circuits have roads four cells wide and the park and estate roads only three. On the narrow ones you can't all go round a corner together, which is exactly where the knocks happen.
Building it
Gold Top Grand Prix is written in Z80 assembly with the sjasmplus assembler, on top of the small engine every new game in the arcade now shares: the interrupts, the controls, the score, short sound effects and a message line that draws a few letters each frame so it never slows the game down. The code fits a 48K Spectrum with room to spare, about 15 KB.
The float itself is a 14 by 14 pixel sprite in 16 directions. We drew three by hand: facing right, a little below that, and diagonally. The other thirteen are those three mirrored and turned through quarter turns by the graphics generator, which also draws everything else from ASCII art: the font, the road tiles, the dog, the big title lettering and the loading screen. When the game starts it makes a copy of every direction shifted to each of the eight pixel positions inside a byte, so drawing a float is just a matter of copying bytes. It draws only the rows and bytes that actually have ink in them, which matters with four floats to move every frame.
Colour on the Spectrum is set per 8 by 8 cell, not per pixel, so two things of different colours in one cell will clash. Our guide to attribute clash explains why. We kept the road black and let each float paint the few cells its ink touches in its own bright colour, then put the road's colours back as it moves on. When two floats touch, one of them borrows the other's colour for a moment, which is as Spectrum as it gets.
The handling is what makes it feel like a racer. Each float keeps two directions: the way it points and the way it's actually travelling. When you turn, the travel swings round to follow at the float's grip, so you drift a little through every corner. On spilt milk the grip drops to almost nothing and you slide. Hit a wall at an angle and you slide along it; drive straight into one and you lose half your speed.
The circuits come from a generator too. Each one is a closed centre line and a road width. The generator lays the road, puts pavement or a grass verge and a hedge beside it, decorates the rest of the screen with houses, gardens, a pond or the dairy's crates, then checks the result: no two stretches of road may touch, so there are no shortcuts, and the line the rival floats drive has clear road on both sides all the way round.
The rivals steer by aiming at a chain of points round each circuit, turning towards the next one and easing off when it's well off to the side. They use exactly the same physics as you, so they slide on milk, spin when the dog gets them and get stuck on cones. The attract demo uses the same driver for Dot's float.
On the 48K, sound comes from the beeper: squeals, knocks, the clink of a gold top, the dog, the lap chime. On the 128K the AY chip adds a whistled title tune and a race tune that gets quicker on later rounds. Like every game in the arcade it makes no calls to the Spectrum's ROM, so Specz can start it instantly without one.
Testing it
We test every game in two ways: the tape loading through the real 48K and 128K ROMs, exactly as on the hardware, and a computer player that races thousands of frames while scripts check the rules. The computer player drives like the rivals, and it also fetches gold tops near its line and shops at the Depot.
It found plenty. The pack of rivals kept slowing each other down, because every touch cost both floats a quarter of their speed; now only the float that runs into the back of another loses out. A float that clipped the inside of a corner stopped dead, because hitting a wall halved its speed every frame it stayed against it; now it slides along. The countdown box was missing the circuit's name, and one of the results lines was red text on a red box.
The biggest job was speed. A Spectrum frame lasts a fiftieth of a second, and the first version sometimes ran over on busy frames, with four floats, a dog, a sound and the score all changing at once. Drawing only the inked rows, a tighter colour routine, remembering which cells each float had painted, and splitting the sounds into shorter pieces fixed it. Now every frame of every round has time to spare on both machines.
Balance came last. At first Dot's float handled worse than the rivals' floats, so the computer player lost every corner. Now the stock float handles as well as theirs, the first round's rivals are slower, and the Depot's upgrades carry you through the later rounds. On its own, the computer player wins the first four rounds without upgrades, and a whole game takes it round all eight circuits once and partway round again.
How to play
O and P turn the float, Q or Space drives, and A brakes. The cursor keys and a Kempston joystick work too, and R on the title lets you choose your own keys. On a phone, the big arrow buttons steer, FIRE drives and the A button beside them brakes.
- Scoring. A lap is 100 points, a pint 100 and a gold top 25. Finishing first adds 3,000, second 1,500 and third 500. There's an extra float every 20,000 points, up to five.
- The Depot. Each upgrade has four levels, costing 2, 4, 6 and 8 gold tops.
- High scores. Your best is kept on this device, and the arcade's online leaderboards have a top ten for the game.
Some tips from our own races:
- Ease off before the corner. Let go of drive a moment before you turn and the float grips sooner.
- Take the inside line. The rivals follow the middle of the road, so there's room on the inside of most bends.
- Buy grip early. It helps on every corner, and even more on the milk.
- Don't chase every gold top. Pick up the ones near your line; a wide detour can cost you a place.
- Watch for the dog. It waits at the side of the road and runs across now and then.
Play it now
Gold Top Grand Prix is in the arcade now, free in your browser, or read more about it on its game page. If you like a challenge that's all about control, try Frostwinch next, and read how we made it in New to Spectrum Arcade: Frostwinch.