Skip to main content
Howarth Games Howarth Games logo
Blog

Writing fruit machines in Forth

· 1 min read · Martin Howarth

In 2001 I moved from testing machines to writing them, as a Software Engineer at Barcrest: reel and video gaming machines, in Forth and C++.

Why Forth?

Forth surprises people. It's a stack language with almost nothing to it, and it compiles to something very small. On hardware where memory is measured in kilobytes, and the processor has other things to do, that's exactly what you want.

You define words, and the words define more words, until the top of the program reads like a description of the game rather than the machine. Written badly, it's unreadable. Written well, it's the tersest correct thing in the building.

Coming from the Commodore 64, where every byte mattered, it felt like home.

The half nobody sees

The game is only half the job. The other half is everything around it:

  • the credit and payout logic;
  • the meters, which have to survive a power cut mid-spin;
  • the door switches; and
  • the recovery when the machine comes back up in the middle of a feature and has to work out where it was.

The layer underneath

From 2004, as a Production Software Engineer, I wrote the embedded hardware libraries the reel machines were built on: stepper reels, hoppers, note acceptors, lamps, buttons and meters. Unforgiving work: a fault in a shared library is a fault in every machine on the line.

More on the Barcrest page.

‹ All blog

Commodore 64 games, and iPhone apps

Raw Recruit, Puzznic, Sky Shark, Baby Blues and the rest of the C64 games and the stories behind them, and the iPhone apps made since.

See the games See the apps