Home Games Words Events Other

Digitiser: The Game: Development

Part 4 - 25th July 2018

< Previous  Next >

Before I begin part two of the technical dive, I need your help.

The story is sketched out, protagonists included, but the supporting cast is rather skinny. So, which lesser-know Digi characters do you feel deserve at least a cameo appearance?

It doesn't matter if nobody else liked them, or that they only appeared once, or didn't even have a picture. What matters is that you loved them, dearly. But not too dearly, otherwise you wouldn't want to risk some amateur idiot defiling them in a poxy game.

I can't guarantee to include them, but will compile every suggestion received during the next month. Then, when inspiration runs drier than my tea mug, I'll flick through that list, and might just chance upon your favourite. Send your requests here, please:

comments at arbitraryfiles.com

Hazy memories are fine too, though Super Page 58 may dispel your fog. You should probably go there regardless, because Bellston has been very busy. Also, it's your last chance to flee before the machine code commences. I asked Mr. Biffo for comment, but he just shivered and booked the whole of August off.


100% Machine Code

First, a little about the “machine” part - the Z80 processor at the heart of the ZX Spectrum. This also powered arcade games such as Pac-Man and Dragon's Lair, the Nintendo Game Boy and Sega Master System, fuel pumps, synthesisers, and banking systems. The main competitor was the 6502, as used by the Atari VCS, Commodore 64, and NES, so those two little mass-market chips basically shared custody of the computer games child.

Processors still shuffle and compare numbers all day, only faster, and the surrounding pile of accumulated knowledge reduces the drudgery of programming. Like evacuations fuelled by adrenalin and fibre, processors are thick and fast. Here's what the Z80 knows:

Those mnemonics are from assembly language, rather than machine code, but translation requires only the table of corresponding numbers. Software could do that much, even in 1982, though some limitations expose the exaggeration of a bedroom coding industry.


Crushed by the Wheels of (not the bedroom coding) Industry

It's late 1982, and Clive Sinclair has finally delivered the ZX Spectrum that you ordered. Assuming that you splashed out for the 48k model, there's 40.5k of memory free after the television display and other essentials take their slice. The assembler needs 8.75k, and unless your code is perfect first time, another 5.75k for the debugger.

There is now 26k left to hold your source code and the compiled output. Writing a full game requires coding in small, carefully-planned chunks to be stitched together later. Don't forget the graphics, probably converted from graph paper by hand, and hurry, because Jetpac will be out in a few months.

With no other commitments, skills honed on the ZX81 predecessor, and good business sense, it was possible to make an early hit without an extra development computer. For everyone else there was BASIC, the friendly code editor and debugger. It was included as standard, ready to use when the power came on, but weighed down by quaint optimism that it would be widely used for more than LOAD ““, or 10 PRINT “NAUGHTY WORD”.


Don't Buy Hareraiser

There were four honest ways to make money with BASIC games. It was suitable for text adventures, though most authors would switch to specialised engines, like The Quill, from 1984 onwards. Strategy games were similarly sedate, with Journey's End being the mini-epic apex. Thirdly, educational games, like the delightfully morbid Crack It! Towers.

The dishonest way was to spend the budget on advertising, an attractive box, or anything else but game development. Not that speed really mattered for Hareraiser, which was a grossly overpriced handful of cryptic sentences and some trees. Cheaper still, Cassette 50 paid each of the fifty authors just enough to buy their own copy, though is excused for later inspiring the comp.sys.sinclair Crap Games Competition.

The fourth honest way was the singular Don't Buy This, which embraced the crapness resulting from good intentions. Strictly, it includes two games featuring machine code, but still demonstrates how much standards had risen by 1985.

Curiously, ZX Spectrum BASIC is one of the few pure machine code programs. Every cassette game uses its loading routine, even if only to load a custom loader. It is part of a complete operating system, including a printer driver, sound generator, scientific calculator, and generous library of other functions, all within 16k. If you can understand The Complete Spectrum ROM Disassembly, then writing games is trivial.


Comfortably Numbers

The Digi game will be powered by a machine code engine, which I originally developed for a text-ish adventure, then improved for the Found Footage game. It reads numbers and converts them to instructions, like assembler to machine code, but reversed. The numbers, instructions, and graphics are compiled in advance. When it crashes, an emulator is my debugger. This is decadent luxury compared to working on the original hardware alone.

The simplest instruction within the engine corresponds to two machine code instructions, while the most complex uses a few hundred. Adding more instructions is easy, but the trick is balancing usefulness, speed, and compactness. For example, the drawing routine that was demonstrated last week includes a decompresser, which is great for still backgrounds but chokes on moving objects. Customisation is required.

The other planned improvement is multi-tasking. Text adventures can work linearly, but bin-tampering demands an independent antagonist. In theory, all I need to do is to add an instruction queue handler, then some instructions to populate that queue. In practice, I anticipate two days of exuberant coding, then at least two weeks of weeding out errors. These will range from typos to fundamentally flawed logic, both with catastrophic results.

Fittingly, this diary entry crashes to a bewildering halt. Don't forget to send in your obscure character suggestions!

Hungry for more detail? Then please, ask-me-do about anything herein. Wondering what could be with modern tools, rather than exactingly arranged numbers? Behold, the future.


Email: comments at arbitraryfiles.com