r/retrogamedev
•
u/VirtualHat
•
10h ago
I've been working away on a DOS voxel racing game over the past two years.
youtube.comI wrote a DOS game over two years, some of which was on real hardware (a Pentium 166 MMX at the time), but most of which was on Dosbox-X/86box. The first 18 months was completely hand-coded on free pascals text-mode IDE. Just like I remembered BP7 back in the day.
To make voxel rendering fast enough on a Pentium computer I had to write a ton x86 assembler. Almost everything had to be optimized. I managed to get it to > 80 FPS though.
I love writing things from the ground up, so I wrote my own Sound Blaster driver, made my own PNG/JPEG like formats, and basically reinvented 1990s tech. I even wrote my own git like version control.
More than happy to share the technical details. Here's a few things:
- Pascal was a lot of fun, and with x86 assembler, is super fast. Plus FPC is a great compiler, so no issues there.
- Build time is about 1-2 minutes on real hardware, and that's for 50-100k LOC, depending on what I'm compiling.
- I made my own audio format, video format, JPEG/PNG, zip, and more. They're all *super* fast.
- Back in the day, I did a lot of 16-bit dos protected mode stuff, but this is Go32v2.
- It runs in DOS, I think even MSDOS 4.0 is supported, but I've only ever tested it under win98's DOS.
- Claude code helped me with the last 3-months of dev, but before that it was just me + keyboard + a prehistoric IDE.
You can play the game here https://ninetysix.io/games/airtime/ which runs Dosbox-X emulator in your browser, or you can download the DOS version to play it on real hardware.
I'm happy to go into more of the techniques I used to make this work. Dirty rects, SDF fields for voxel tracing, a voxel splatter, avoiding memory allocations during the game, MMX stuff, etc
If you do get the game running on real hardware, please let me know! I'd love to see a photo of this.