Black Art of 3D Game Programming (1995)
archive.org
archive.org
I was in my late junior or early senior year of high school when it came out. My stepfather had a 386/20 and then later a 486/33, a Borland C compiler, and a generic 700 page "Learn C" book at home, and I had worked all the way through the book. But I couldn't for the life of me figure how in the world to bridge the gap between the extremely slow, "high res" 16 color graphics libraries that came with the compiler, on the one hand, and what Wolfenstein and Doom were doing, on the other, both of which I was utterly entranced by.
And then I saw LaMothe's book on a random shopping trip to... Software Etc, I think? I'd never seen anything like it. And I knew I had to have it, immediately.
After getting that book, I was diving headlong into relatively fast VGA C programming in mode 13h (320x200x256 color). I spent the afternoons of my senior year of high school writing relatively fast texture mapping routines and trying to get full screen 30+ fps interactive scenes and levels running, which I think I mostly did. I had to write my own paint program, too, for 256 color palettized textures. It was thrilling.
Thanks largely to my time with that book, later when I was introduced to the internet the first week I started a Computer Science program at college, I was primed to dive into all the awesome C open source game libraries and tools (like Allegro and DJGPP) that I found online, and I was making commercial games and working in the guts of the Quake and Quake 2 code bases two short years later. (The book and then the internet were not, however, great for my college career)
I know there are corny parts of the book, and maybe things that weren't as cutting edge as they claimed to be. It doesn't teach you how to actually write actual Doom, of course.
But prior to the widespread roll out of the internet, it's hard to get across just how inaccessible most of the knowledge in the book was, at least for a high school kid like me. It really was like turning on a light switch when I got it. Sometimes something is just at the right place at the right time for someone, and that's what that book was for me.
[0] https://theswissbay.ch/pdf/Gentoomen%20Library/Game%20Develo....
And a shout-out to mode13h. In my case it was BBS and Denthor's tuts that changed my life.
Good times.
Mode 13h changed my life and set me on the course to being a graphics coder today (along with an email from John Carmack!), it's been such an amazing ride with hardware getting exponentially faster every year (RIP to that). I ought to get mov ax, 13h; int 10h tattooed along with 0xa0000, 0x3c8, 0x3c9 or something :)
Add 0x5f3759df to the mix ^_^
Speaking of JC, what did his email say? Cool memento that, I hope you framed it!
LaMothe is special because I’ve actually had it since I was 8. I still didn’t “get” matrices for years… but I implemented em!
Edits for spelling and year, which I’m still not sure about.
The most recent holy grail of a book for me has been Luna’s D3D11 tome. I haven’t kept up since.
Would you mind listing your collection? I'd love to add some (many) titles to my (small) collection of old programming books.
- tricks of the game programming gurus
- more tricks of the game programming gurus
- tricks of the 3D game programming gurus
- black art of 3D game programming
- tricks of the windows game programming gurus
- game programming gems
- AI game programming wisdom
- designing virtual worlds
- gardens of imagination
- flights of fantasy
- cutting-edge 3D game programming with C++
- dungeons of discovery
- action arcade adventure set
- amazing 3-D games adventure set
- DOS undocumented
(not from the era, but about it):
- game engine black book: wolfenstein 3D
- game engine black book: doom
Some would enjoy nostalgia and some perhaps would actually learn something from them. May be you can recommend a few titles that would be relevant for today or simply fascinating, regardless of their relevance."
I really knew nothing about “game programming” when I wrote the book, but I did know a few things about graphics programming, and in particular a thing called “WinG” that was a very short-lived extension to Windows that I had used a lot in a product I helped develop.
But most importantly for me, I wanted to write something that inspired a young person of the right inclination to become as fascinated by programming as I was.
Also very much worth shouting out Mark DeLoura's 'Game Programming Gems' series -- I'm not sure how it even happened, but I got a chapter published in the first volume while being a 17 year old kid who had zero professional experience in any industry of any kind lol (I just replied to a call for submissions on Gamasutra, was told 'ok code it up and write a paper' and I did. And they printed it!)
I got a lot out of Crafting Interpreters, typing in the bytecode VM by hand and working slowly through the book. Stitched a lot of things together in my mind which previously had only been half-understood research papers.
In hindsight, I really had no idea what I was talking about (especially regarding performance with large amounts of polygons) but the math did end up seeming to be good; I actually went back a couple years ago and took parts of it for some other 3D projection / line-plane intersection thing I made and it still worked. Super cool experience either way being given an opportunity so young and seeing it come to life!
I had another idea for a Gems 2 article that never made it in time (using grayscale UV texture maps on a 3D model to distribute a fixed amount of weight across model vertices for use in a physics simulation -- ex. a hammer weighs X but the metal part is much heavier than the wooden handle) but again was literally just making things up out of thin air to have something to contribute LOL
I learned a lot from the book but some of the topics where a little too advanced for me at the time, as I was still learning C and grappling with x86 assembly language.
However, I rediscovered the book several years ago and implemented something similar to the ray caster (which had really impressed me at the time) in DOSBox. I tried to optimize the algorithm and add a few enhancements. It was lots of fun! A genuine (early 90s) retro experience! I think I even had to fire up Turbo Debugger to solve a few problems.
Tangential, but love and remember the inside cover quote about integrity being a lonely path to follow. Thought about that one time to time over the years.
Whereas: this book was written by André LaMothe, who did not work on Quake. It predates Quake and AFAIK doesn't mention it.
Crazy
I never went in to game dev, but I did learn a lot from the experience.
Not great to learn that way. I finally got a computer in 1996 and had trouble getting the code examples setup... So I called Andre at this home! I was 15 at the time.
Back then, people generally had their number in the phone book so I somehow found the number for "Information" in San Francisco (Information was Google before google, for phone numbers basically. It had all the White Page information).
Anyway, I call up, and his girlfriend answered the phone. She seemed a little disgruntled (maybe just woke up) but I asked her if I could talk to Andre. He got on the phone and actually explained to me that I needed to link the libraries needed in the C++ GUI (I vaguely recall that the CD maybe came with one?)
After that he talked to me about a bunch of stuff about work ethic and programming philosphy. He had a super duper insane work ethic, writing all those 900 page books plus all the code and example games for that. And he was grinding them out pretty often, plus contributing a lot to other books, plus doing his own startup. 100 hours a week for years, and he's pretty smart so he works quick.
Anyway. I really took his advice to heart and when I got into the working world I took jobs very seriously and worked like a madman. In about 6 years I went from broke to basically having enough money to retire. And I really owe it all to him and that conversation we had that day. The lesson I took away from it wasn't to kill yourself working but that it's better to sacrifice some time upfront than have constant money issues. As a kid from a poor family this was huge in helping me get out of poverty. I never got a degree but really just his advice about hard work made it possible.
I got a chance to reconnect with him on Linkedin a couple years ago and share my story and he was really thrilled with how it went and took a lot of interest. He's continued on with all sorts of game programming startups and we kinda talked about it.
He could have easily done web development and made a killing doing his own startups but he was just so passionate about video games (keep in mind he was an adviser to Carmack). He led an army of people who went off to be game developers, though he said most pivoted to other things.
Andre was quite literally one of the most influential people in my life and I owe him a lot, and to this day I can't believe he'd take time out of his insanely busy schedule to help some kid all the way across the country, for no real gain to himself.
It might not be the super low level stuff like the 90's books but you're making a more complicated and complete game using a higher level language and all the libraries etc that really didn't exist back then (at least like they do now)
Examples of the stuff that doesn't apply today are
* Graphics using VGA
* fixed point math for speed
* input output routines under DOS (keyboard, joystick, mouse)
* Sound under DOS
* Networking under DOS (null-modem)
* DOS interrupts
* 32bit stuff
* 80387 floating point
The parts of the book that discuss the maths are quite good.
The first book covers the mathematics needed, the second is on Rendering and is when it starts to get into real graphics applications. Third and Fourth are slated to be Models/Materials and Physics respectively, but neither have been released yet.