Doom RF: a birthday present that took two weeks — and a year
On 27 February 2001 I started a game as a birthday present for a classmate — two friends asked for something to make him laugh. Two weeks later Doom RF was playable. Ever since, I believe that a project started at the end of February will succeed.
I based it on Doom 2D and took the graphics from its WAD file. The engine drew 320×200 in 256 colours. Sprites were pre-processed into vertical strips, and each strip went to video memory with a fast memory copy — a trick I had invented earlier for Space War 2.

Doom RF gameplay, a frame from my YouTube video.
Then I kept improving it for almost a year. The biggest win was moving from Borland Pascal to Free Pascal: the generated code ran several times faster, and the 64 KB limit on a unit’s size was gone.
Free Pascal could also draw 640×480 in 256 colours — with a catch. PutPixel was slow, and direct access to video memory only reached the first 64 KB of the screen, about a fifth of it. So I combined the two: one PutPixel to make the driver switch the memory bank, then the whole buffer for that bank written with a plain memory copy.
I didn’t find that in any documentation — I discovered it by experiment: drawing one pixel at the right address made the driver switch to the next bank, and from then on a plain memory copy filled the whole 64 KB block. The result was very fast graphics.
The second problem was the keyboard. A game needs to know which keys are held right now, and in Free Pascal direct keyboard input simply didn’t work. So I wrote a tiny resident program in Turbo Pascal, agent.exe — about thirty lines. It hooked the keyboard interrupt, read the raw scan codes from the keyboard port and kept a table of 256 “is this key down” flags in memory, then stayed resident. On start it wrote the memory address of that table (segment and offset) into a small file, agent.mem. The game, built with Free Pascal, read the address from the file once and from then on looked straight into the agent’s memory to see which keys were pressed. Two programs, two compilers, one shared table in memory.
What the game had:
- 4 players on one computer plus up to 8 bots;
- bots navigating by waypoints;
- teleports;
- cut-scenes between levels;
- a level editor.
In 2026 I ported it to 64-bit and SDL2, added sound and shipped it properly — download it here.