OUR EXPERT
Nate Drake
is a tech journalist specialising in cybersecurity and retro games. His first experience of video games was the ‘cocktail cabinet’ version of
Space Invaders
in his father’s local.
Part One!
Don’t miss next issue, subscribe on page 16!
Part One!
Don’t miss next issue, subscribe on page 16!
QUICK TIP
By default, lines of Basic code are spaced 10 apart in case you need to go back and add anything extra. If you run out of space, use the RENUMBER command.
QUICK TIP
By default, lines of Basic code are spaced 10 apart in case you need to go back and add anything extra. If you run out of space, use the RENUMBER command.
In 1978, Taito released Space Invaders. The game represented the fruits of over a year of hard work by Tomohiro Nishikado, who created both the game and custom hardware to run it.
The game went on to resounding success, earning its developers billions and spawning a number of clones. To this day, the symbol of one of its pixellated aliens is synonymous with video game culture.
It’s unsurprising, therefore, that a Cosmic Invaders clone of the game appeared in the Giant Book of Games for Your BBC Micro in 1984. This is the basis for this four-part series, in which you will learn how to code your own Space Invaders clone using BBC Basic.
Much has changed in the last 40 years in computing but Basic remains a flexible and easy-to-master programming language, which makes this an ideal project for people new to coding.
The code on which we are basing this tutorial was originally written by Mark Buckwell for the Giant Book of Games for Your BBC Micro. This in turn inspired Acorn and BBC hobbyist Colin Hoad to upload the game code to his GitHub page (https://bit.ly/ cosmicinvaders).
Getting started
The game also draws on key programming concepts such as loops, custom animations, sounds and collision detection. Once you’ve mastered this, you’ll be well on your way to coding other titles.
This gives you a huge advantage in 2024, as original readers of the book would have had to type in the code manually line by line. As Colin notes on his YouTube channel, this usually would require hours of debugging to account for typos.
First, download CosmicInvaders.bas to your Linux machine using the above link. Next, you need a BBC Micro emulator. There’s a number of popular programs, but for this project we’ve chosen b2. This is because there’s a Snap version in the Ubuntu Software Center. Most Linux distros also have other emulators you can install directly from repositories such as Brandy.