Historical Detour

As I’ve been up to my eyeballs in engine coding for QubeKwest I began to wax nostalgic. This led to conversations with people about old game engines, which in turn led to the purchase of a series of interrelated books, which in turn led to reading them. Really nothing about this pattern is especially odd, but it is rather impressively distracting. I think I was primed and ready for a distraction that prevented me from writing over 1000 lines of Vulkan boilerplate setup code and these books provided that perfectly.

The journey through history started with the Game Engine Black Book: Wolfenstein 3D by Fabien Sanglard. This book was very hard for me to put down as I grew up with the computers that were described in the book (386 CPUs running DOS on practically no RAM) and Wolfenstein 3D was the first FPS I’d ever played. All told this book only took me about 3 day to plow through cover to cover. There’s a fair bit of code, a lot of helpful diagrams, and tons of screenshots. (In other words, I recommend getting the paper version of this book instead of a digital form.)

Once I was done with that game engine, I was on to the next one made by the same guys at id software. The Doom engine was my personal favorite growing up. It was so immersive and killing hordes of demons was more varied and entertaining than killing enemy soldiers. This led me directly into the Game Engine Black Book: Doom also by Fabien Sanglard. This one was about other computers I had growing up (486 CPUs, still running DOS, and barely more RAM) and the guts of how a BSP (binary space partition) based game engine works. There was a ton of interesting information in this one about porting Doom to other platforms too. Most should never have had a port of Doom, but it was interesting none-the-less. This one was a bit longer and took me about a week to read through.

Having now become completely fascinated with the guys that started id Software and the game engines they created, I took a step further back in time and picked up Masters of Doom: How Two Guys Created an Empire and Transformed Pop Culture by David Kushner, which drops the coding side of the story in favor of the story of the people that created it. This book is far older than either of the earlier two I mentioned, and it’s an inspiring read of how a couple of scrappy kids eventually went on to make a ton of money and mostly have fun doing it. I’m still reading my way through this one, and the guys (as I’ve come to refer to them) have put out Commander Keen, Wolfenstein 3D, and Spear of Destiny and are just getting ramped up on making Doom.

All this reading spun off a temporary side project to see if I could write my own version of the Wolfenstein 3D engine from scratch in JavaScript. After a weekend of working on it, I had the ability to walk around in a place with texture mapped walls. I was proud of what I’d done, so I took a bit of time to add a 2D overhead map that updates with what the rays looked like that were cast to produce the 3D view and tracked the player as they wandered around. Next I tried to make objects (like lamps and tables and bowls of dog food) and while I did manage to get my raycasting method to work as a recursive algorithm to allow mostly transparent objects, I never did quite get them to show up properly. I also never tried to make doors, elevator switches, or secret push blocks, but I considered what I’d made in a weekend as “good enough” for a distraction and called it as done as I was likely to make it. At least for the time being.

With a lot of reading and a side project mostly behind me at this point, I’m back to where I get to climb that mountain of Vulkan boilerplate setup code. I’m not sure how much fun it’ll be to write, but it is definitely all new to me, so there’s something to be said for that.