The Forest - history
In May 2014 I had a blast from the past about some games I wrote for the Sinclair ZX Spectrum and similar machines 30 years earlier. It seemed that the current resurgence of interest in popular programming may be reviving the ideas behind the games. I had a particular technique of my own for generating terrain on a large enough scale to be explorable, despite the lack of memory in those early machines (the Spectrum had only 48k bytes - and that was the larger version). Indeed, one of my games was simply called Explorer. Its predecessor, The Forest, was a simulation of the sport of orienteering.
The first PC I owned was a Tandy (Radio Shack) TRS-80 with 16 kilobytes of rewritable memory and a BASIC interpreter in read-only memory. In those days BASIC (Beginners All-purpose Symbolic Instruction Code) was the programming language available on most home computers because it was not only easy for beginners to write but also relatively easy to interpret by programs written in the more fundamental language of the hardware processor. The microprocessor in the TRS-80 was a Z80, from a company called Zilog. It was a neat development from the earliest microprocessors because some of its 8-bit registers could be used in pairs, as 16 bits: values could range from 0 to 65,535 (2 to the power 16) and this not only enabled reasonable arithmetic but it meant that 64 kilobytes of memory could be addressed easily.
I set about developing algorithms that could generate maps, first in BASIC and then I taught myself the Z80 assembly language to program the processor directly (for greater speed and compactness, to get more program in the memory available, but at the cost of less easily comprehended programs).
The graphics on the TRS-80 were very crude, just green and black. Nevertheless I managed to produce a first simulation of orienteering and a printed map to go with it. The program and map were published by a company called Molimerx which specialised in programs for the TRS-80.
In 1983 I obtained a Sinclair ZX Spectrum. This machine was based on the same Z80 processor but it had much more rewritable memory available: 48 kilobytes. I was able to use my existing assembly program, wrap it in a bit of program written in Sinclair's slightly different version of BASIC and extend it with several additional features. The Spectrum version of The Forest was published in 1984 by Phipps Associates.
I agreed with a fellow orienteer, Chris Barrington-Brown, that he could convert The Forest to run on the BBC Microcomputer which used a different processor, with a different assembly language. That version appeared a year or two later.
A different game based on the same core of program was called Explorer. It was developed as more of a team effort. The programming was still all mine but the graphics were created by Simon Dunstan, of the RamJam Corporation in London. He was able to do wonderful things in the extremely limited graphical environment of the Spectrum. RamJam got the program published through Electric Dreams.
There is a web site called Spectrum Computing where a group of people are attempting to assemble an archive of all programs written for the ZX Spectrum and make many of them available to download and run in one of the many Spectrum simulators that are now also available for free. They have listed my two programs here (The Forest)and here (Explorer).
There is also an interesting article looking back at Explorer on Mark Green's blog, Pixelatron.
Technology has advanced so much in 30 years that much better versions of such games are now practical. For one thing processor clock speeds have gone up by a factor of nearly 1,000 - the Spectrum ran (I think) at 3.5 MHz. It is common now to have multiple processors in a single machine (eg, the Intel Core i5 etc), giving another potential speed increase. Also the processing of graphics is now usually hived off to a separate Graphics Processing Unit (GPU) rather than the Central Processing Unit having to do everything, as was the case all those years ago. Today's processors also have special instructions built into their hardware for frequently used computations. I think it was in the mid-1980s that Intel processors (such as 80286) started to have companion chips called coprocessors, for doing non-integer arithmetic. Devices on silicon have now been so much further miniaturised that all such work can now be done on a single chip rather than requiring a coprocessor.
It is now common to have gigabytes of main memory. The Surface tablet/laptop on which I am writing this has 16 Gbytes of RAM, which is 333,000 times that of the Spectrum. It almost goes without saying that we can now have very much better graphics, of photographic quality, something I could only dream of in the 1980s.
|Hardware||Sinclair ZX Spectrum|
(also for TRS-80 & BBC)
with internet access
+ a little BASIC
+ a little HTML
|Processor(s)||Single processsor for program & graphics,|
|Multi-core, separate graphics
64-bit, floating point
|Clock||3.5 MHz||around 3 GHz|
|RAM available||48 kilobytes||Several gigabytes|
|Graphics||256 x 192|
15 colours (in 8 x 8 blocks)
|1920 x 1080 or more
Millions of colours at every pixel
|Thousands, from 1m
to 300m ahead
|Display||Plug into TV|
interlaced, not steady)
|Other||No discs, no internet,|
load from cassette tape
via audio cable
|Download over air|
The last of those is from Explorer, showing Simon Dunstan's clever technique with the very blocky Spectrum graphics.
In 1982 I had two articles published in the now long-defunct British magazine "Practical Computing". The articles described the basic techniques I was using to generate terrain from mathematical functions rather than storing it in memory. Following here are links to scanned images of the articles.