Developer diaries

Developer Diary: 25 Caverns and Eleven Power-Ups in Gemquake

Gold bricks, TNT and eleven capsules in 25 caverns. How we designed Gemquake, measured every power-up and made sure you always know what you've caught.

Gemquake is our bat-and-ball game: you steer a mining pod along the bottom of the screen and keep a ball bouncing into walls of crystal, through 25 caverns that run from First Dig to The Motherlode. It plays like the Breakout games of the 1970s and 1980s, but every brick layout, name and picture in it is new. This is how the caverns and the power-ups came together, and why the game now tells you what you've just caught.

Seven colours and three kinds of trouble

Each cavern is a grid up to 15 bricks wide and 11 rows deep. Ordinary bricks come in seven Spectrum colours, each worth a set score: 10 points for blue, rising through red, magenta, green, cyan and yellow to 70 for white.

Three special bricks make the caverns interesting:

  • Armoured bricks take two or three hits and show a crack on the last one, so you can see how close you are.
  • Gold bricks never break. They are walls you have to aim around.
  • TNT bricks flash, and when hit they blow up all eight bricks around them. If one of those is TNT too, the blast carries on.

Break four bricks in a row without the ball touching your pod and the points multiplier goes up one step, as far as five times. Clever angles pay.

Caverns you can always clear

Gold bricks bring a danger. Put them in the wrong place and a breakable brick can end up sealed inside, where no ball can ever get to it. Then the cavern can never be finished, and the player has no way of knowing why.

So the 25 caverns aren't typed into the code by hand. They are drawn as small text maps, one character per brick, and a script turns them into data for the tape. Before it does, it checks two things: that every breakable brick can be reached past the gold, and that no brick has gold directly above and below it, a narrow slot the ball could get stuck bouncing in. If a design fails, the build stops.

Eleven capsules

About one broken brick in eight drops a capsule. Catch it with the pod and something happens. Most are good news: M for multiball (three to ten balls at once), F for a fireball that smashes straight through bricks, B for a bomb ball, L for lasers, W for a wide pod, C to catch the ball, S to slow it down and + for an extra pod. Two are traps worth 400 points each, N for a narrow pod and Q for a quicker ball, and ? is a mystery that turns into one of the others.

We wanted to know each one really pulled its weight, so a test script collected every capsule in turn and measured what it did. From the same moment in the same cavern, over 12 seconds, the plain ball broke 5 bricks. The bomb ball broke 23, the fireball 27 and the lasers 46. Catch held the ball, slow and quick changed its speed in the right direction, and narrow cut the pod to 16 pixels.

One more rule keeps things moving. If no brick breaks for 20 seconds, perhaps because the ball is looping between two gold bricks, a helpful capsule drops from the top of the screen.

Telling you what you caught

The power-ups worked, but in early play it was hard to tell that they did. The ball is only 4 pixels across, so a fireball and a plain one are easy to mix up, and a capsule that changes nothing you can see feels like a wasted catch. The pickup messages were added after play-testing showed exactly that, and the finished game gives plenty of feedback:

  • Every pickup is announced on the bottom row for two seconds, with messages such as "LASERS-HOLD FIRE" and "CATCH-FIRE LAUNCH". The mystery capsule says what it turned into.
  • The fireball is drawn as a spiky X and the bomb ball as a hollow box, so you can see which one you have.
  • A letter badge stays on the bottom row while each timed power-up lasts, and it blinks for the last three seconds. The special balls blink back to round too.
  • With lasers on, the pod turns red.

It's the lesson we took from the whole project, and our diary on getting the arcade from load to live says the same: put clear feedback on screen from the first version.

Testing with an autopilot

Gemquake is written in Z80 assembly and runs without the Sinclair ROM, with its own interrupt routine. The ball's position is kept in fixed-point numbers, which let it move by fractions of a pixel. An autopilot loaded the tape through the real 48K and 128K start-up routines and cleared all 25 caverns on both, then played through the ending, the faster second loop, game over and the high-score table.

Testing also found one nasty bug. If the pod arrived under the ball a frame late, the ball could pass straight through it. The hit test now covers the full thickness of the pod. What we haven't checked yet is how it feels on real hardware, so if you load the full tape on a real Spectrum, we'd like to hear.

Play it

On a 128K you'll hear "Crystal Fever" on the title screen and "Pickaxe Boogie" in the caverns, in five versions that take turns from cavern to cavern. You can play Gemquake in your browser with keys or a pad, and our guide to using a gamepad with Specz shows how to set one up. Then see what else is waiting in the arcade.

More from the journal

Developer diaries ·

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.

New games and guides, straight to your inbox

Hear first when a new Spectrum game lands in the arcade. No spam, and you can unsubscribe whenever you like.