ZX Spectrum Games

ZX Spectrum Games

30 Apr 2010

Spectrum Games - Programmer Interview - David M Webb

David M Webb was a programmer and author of many books for the ZX Spectrum

His books included 'Advanced Spectrum Machine Language' and 'Supercharge your Spectrum' - which were both big sellers.

Many gamers will remember his 3D classic arcade game Starion, and anyone who was into arcade gaming on the ZX Spectrum from the early days may well remember the Pac-Man style game Spookyman.

We were lucky enough to catch up with David who was more than happy to talk about his Spectrum coding days.

Starion ZX Spectrum
1: What was the first computer you ever programmed on, and how old were you at the time?

In 1978, at 13, the parent-teachers association at my school (Fulford Comprehensive, York) used some of their school fete money to buy a teletype terminal and a 300-baud acoustic modem, and we were given an account on the DEC-10 mainframe at York University. So with that, we could write and run basic programs.

The machine had no display, but printed results on rolls of white paper – it was like the machine that used to print the football scores on TV, and very noisy. Games like Lunar Lander were feasible, but in slow motion – you would send a command, and it would move the lander one space and print the results. One of the first programs I wrote was an unbeatable noughts and crosses.

The terminal had a punch-tape reader/writer, so we could store our programs (written in BASIC) on rolls of pink paper punch tape, which fit ideally in a school blazer pocket. Lunchtimes at Fulford were fun.

2: How did you get into the games development scene? Did you start with BASIC before moving into other languages?

Later, in 1981, I bought a ZX81, and taught myself machine language from a book. I wrote a toolkit for the 1K ZX81, which was the first program I sold to Melbourne House, and later a toolkit for the ZX81 with the 16K RAM pack hanging off the pack. The 16K RAM pack cost GBP50, and was notorious for being wobbly, so you had to keep the machine on a solid table to avoid losing memory.

BASIC was, well, basic – you couldn’t do much with an interpreted language on a machine running at 4MHz. Machine language allowed much more. There was a Zilog book called “Programming the Z80” which had details of exactly how many clock cycles each instruction took to execute. Every cycle counted for a top-notch game.

3: How did you end up at Melbourne House? And what was the company like to work for?

I never worked for Melbourne House as such. They were one of my publishers, and paid me royalties based on a percentage of sales of my works, but there was no employment contract. I was still at Woking Sixth Form College and then Oxford University while writing the books and games. A company called Abbex also published two of my games.

4: What was the first game you had published?

After the ZX 81 Toolkit, my first game for the Spectrum was Spookyman, which was not unlike Pac Man.

5: What did you like about programming on the Spectrum and what was your impression of the machine the first time you used it?

Well, the big breakthrough was that it had colour, and a decent screen resolution (256x192 was big news compared to the ZX81), and a separate graphics chip, so the CPU didn’t spend half its time painting the screen, as the ZX80 and ZX81 did. The bad news was that you could only have 2 colours per 8x8 pixel block, so games had to work around that. So there was one memory block of 6KB for the monochrome data (256x192/8), and then a different block for the colour, which was much smaller (32x24=768 bytes). Still, for the 16KB spectrum, that took up quite a bit of RAM. It was certainly built down to a price – hence the membrane keyboard.

For my later games, I used a Memotech machine to write in assembler, and port the code across the RS232 link in the Expansion Pack for testing.

6: And what did you not like about programming on the Spectrum?

See above

7: How did you get into writing books about programming?

Melbourne House asked me to write the books. The first was “Supercharge Your Spectrum” and the second was “Advanced Spectrum Machine Language”. The first one had more mass-market appeal, because BASIC programmers could use it. The second one was, as its title suggests, aimed at more sophisticated users.

8: Did you prefer writing games or books?

I enjoyed both. The books were a bit more tedious because of all the proof-reading, but it was cool to see my name in print at 18. The games were intellectually challenging, because I had to stretch the capabilities of the machine to new boundaries by writing really neat and efficient code.

9: How did you manage to animate smooth vectors and a machine as humble as the ZX Spectrum?

This was a bit of a breakthrough at the time. The key to it was some very efficient code for copying the 4K of active screen area (256x128) during the screen refresh. I had to draw each frame in a separate block of RAM (4K) and then copy it across to the graphics area when the machine had finished drawing that part of the screen to the CRT. So I wrote a routine treated the screen memory like a stack, using every register of the CPU (including the alternates), pushing and popping 16 bytes at a time.

10: Did you move onto the 16-bit machines once the Spectrum scene began to fade?

No. My last game was the Amstrad version of Starion, written in the summer of 1985. The C64 version was programmed (badly) by someone else, but I got a royalty for the game design. Then I had 1 year left to focus on my maths degree.

11: Can you tell us what path you took once you had moved on from the ZX Spectrum? Are you still active in the games industry today?

No, I could see in 1986 that it would soon be impossible for a single programmer to turn out a top-class game, because of the increasing power of computers. So with polyphonic sound and much better displays, it would take teams of people to produce a good game, including composers and graphics designers, and a lot of business knowledge to run that as a company. I didn’t have the business knowledge, and I didn’t just want to be a programmer.

By then I had been investing my royalties in the stock market, and this interest took me into investment banking in the City of London at the age of 21. I moved to Hong Kong in 1991, and this is now my home. I was an investment banker until 1994, then worked for a local conglomerate as in-house adviser for 4 years, then retired in 1998 (aged 32) to focus on my investments in HK small-caps, and set up a non-profit site, http://www.webb-site.com/, to push for corporate and economic governance reforms.

My programming skills still come in handy – I wrote a lot of VBscript and Visual Basic to automate the site, which uses a MySQL database back-end.

12: Were you a games player back then? Did you have any favourite games be it your own or games by other software houses?

Not really. Writing them was more fun. I do recall a couple of good games: Manic Miner and Chequered Flag.

13: Which other developers on the Spectrum impressed you during that time?

I can’t remember any, but it was always cool to see people pushing the envelope with what the machine could do.

14: And finally - with the whole retro game scene booming do you ever fancy writing another game for the Spectrum?

Yes, but I will never find the time to do it!

Here is an example of David's vectror graphics from the demo Show 3D:


Once again many thanks to David for taking the time to do this.

Classic Games, Arcade Games and ZX Spectrum Games


CaptainD said...

This was a very interesting interview - thanks. That 16K RAM pack for the ZX81 was brilliantly designed - it always fell of just after you'd waited 5 minutes for a program to load! :-D

Doug Burns said...

Nice one. Starion was one of my favourite games, a real programming achievement and it sounds like that York University mainframe might have inspired more than one games programmer! I went to AHGS in York and almost identical in age.

Sadly, not identical future lifes. Investment banking - so *that's* where I went wrong ;-)

Anonymous said...

Retire at 32??!! 32!!! There should be a law against that I tell you... ;) :)

Good for you Mr. Webb! Starion was one of the first 3d vector games I ever saw or played on my speccy and it blew me away back then and it still does now.

-Arjun from WoSF

Dylan Cuthbert said...

Great interview - David Webb and his two books, especially the advanced one (both of which I spent my pocket-money on and still have today somewhere), taught me how to program in assembler, and more importantly, taught me to always program *cool* stuff, as the stuff in those books was a little bit crazy (writing numbers in the Spectrum border for example)..

-Dylan Cuthbert (Q-Games Ltd)
PS. Starion was way too difficult though :-)

Anonymous said...

My relatives always say that I am killing my time
here at net, but I know I am getting knowledge everyday by reading thes pleasant
Feel free to visit my homepage : YRPay

Farflame said...

The Advanced Machine Code book was great, and got me into writing games. The only one I got published was 'The Survivors', which wasn't amazing but having a game published at 14 was cool and it was in full machine code, thanks to that book :)

The Retro Brothers Favourite ZX Spectrum Games...

Jetpac Remake