Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Jump to ratings and reviews
Rate this book

Game Engine Black Book, Wolfenstein 3D

Rate this book
How was Wolfenstein 3D made and what were the secrets of its speed? How did id Software manage to turn a machine designed to display static images for word processing and spreadsheet applications into the best gaming platform in the world, capable of running games at seventy frames per seconds? If you have ever asked yourself these questions, Game Engine Black Book is for you.

315 pages, Hardcover

First published January 1, 2017

Loading interface...
Loading interface...

About the author

Fabien Sanglard

8 books72 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
339 (55%)
4 stars
226 (36%)
3 stars
41 (6%)
2 stars
5 (<1%)
1 star
0 (0%)
Displaying 1 - 30 of 66 reviews
Profile Image for Dmitry.
60 reviews25 followers
February 13, 2019
I programmed in assembly on Z80, 8086, 286 and 386 and I still remember (for some reason) what you are supposed to put after "SET BLASTER=" in your autoexec.bat. I played Wolfenstein 3D shortly after it was released (and made its way int ex-USSR territories on floppynet).

So no wonder that this book was a huge nostalgy trip for me. Book has lots and lots of technical details without being overwhelming or dominated by listings. Very nice coverage of VGA, sound devices of the era and all the loops and hoops one had to jump to work with more than 640K of memory back then. Highly recommended.
Profile Image for Simon Eskildsen.
215 reviews1,102 followers
February 11, 2019
This is a really fun walkthrough of the codebase of Wolfenstein. A game where the graphics were ahead of its time, but the team refused to let that lower their ambitions. It goes into John Carmack found a way to use use integers as floating points (since there was no hardware support for floating points), how all assets were rotated 90 degrees since writing vertically was faster than horizontally, and so many other neat tricks. It's refreshing to see software written by someone who has such an understanding of the computer architecture. Fun look into the video game/graphics programming culture of the 90s, that relentlessly pursued optimizations. Recommended nerd read.
Profile Image for Koen Crolla.
779 reviews217 followers
April 8, 2019
The two interesting bits of Wolfenstein 3D everyone always talks about when they talk about Wolfenstein 3D are the ray-casting algorithm and the LFSR powering the FizzleFade that happens when you die or kill a boss—the rest of it is mostly just predictable boilerplate and unexciting optimisations (some of which may be of interest to VGA historians, but almost all of which will certainly do more harm than good today), plus one or two semi-interesting bits about AI that turn out to be very rudimentary. Because those optimisations and some of the other choices require some techno-historical context, Sanglard also includes a bunch of that (some of it is interesting (I want a Disney Sound Source now), a lot of it is very much not), and because nothing in video games can ever not be about Personalities, there are a lot words about the people of id Software as well (Sanglard's admission that you're better off reading Masters of Doom if you want that notwithstanding).
Regardless, the stars of the show are arguably still those two algorithms. If you're hoping a self-described engineering book would give you a rock-solid explanation of them, though, you're out of luck: while Sanglard's treatment of ray-casting is barely adequate (just barely: no mention is made of a camera plane, so if you follow along with the algorithm he actually describes you end up rendering a vertical line), that of FizzleFade is hardly there at all—Sanglard mentions how to implement a linear-feedback shift register, but doesn't seem to know why it actually works. Yes, it's somewhat esoteric and math-heavy, but that's why I bought a book instead of reading a blog post.

(And actually, there are two more non-trivial algorithms it would have been good to hear more about: assets are compressed using Huffman trees and what John Carmack claims is an independent discovery of LZSS (Sanglard himself calls it Lempel-Ziv, but that's a broader class of algorithms), but apparently neither merits more than a name-drop.
Meanwhile, fixed-point arithmetic gets half a dozen pages of laborious schematics. What Sagnlard considers to be self-evident and what he considers to be black magic meriting great elaboration is... not always easy to agree with.)

Other, more minor quibbles I have with the book include much being made of VGA mode 13h's non-square pixels but most of the printed sprites and textures (and, I think, some of the screenshots) having square pixels, typos and grammatical errors still being fairly common despite this being the second edition, and the horrible covers that curl up as soon as you look at them and whose matte finish will leave you with a Game Engine Grimy Book before you make it out of the introduction.

All in all, Game Engine Black Book: Wolfenstein 3D really feels like a self-published book, and it could have benefited from a (relatively) lay editor going over things for clarity and structure. It's also the only book that does what it does for Wolfenstein, though, and, for all its flaws, if that game was as big a part of your life in the early '90s as it was of mine, you'll find it a serviceable nostalgia piece.
Profile Image for Susan.
184 reviews
May 17, 2021
A super fun intro on how Wolfenstein 3D game was made despite the hardware limitations. Back in the 90s, how did id Software manage to turn a machine designed to display static images for word processing and spreadsheet applications into the best gaming platform in the world, capable of running games at 70 frames per second?

The book starts with a hardware crash course on CPU, RAM, the video and audio aspects of the hardware, and then delved into software, covering topics like the architecture, computer graphics, sounds, the enemy "AI" state machines and performance optimizations. I did not start the book with much background, and I skimmed through the book (there are some assembly code included and I didn't even try), but I still walked away with some interesting knowledge on the essential elements of game development and its challenges. (I also learned how joysticks work under the hood, which is super cool!)

I enjoyed the trivias scattered throughout the book, and of course the multitude of pictures. They made the book pretty fun to get through. I'd say that this book is pretty great if you want an overview of game development and optimizations without being bogged by to too many details.
Profile Image for Samuel Miller.
109 reviews4 followers
August 10, 2024
Pretty cool trip through many of the tricks and optimizations used by id Software when building Wolfenstein 3D. Seeing what they could do with such limited hardware was super neat and computer graphics are always an interesting way of demonstrating novel programming techniques--even for things built in the early 90s.

It can be a little dry in some places, but for the most part it was engaging and I found the images / code snippets greatly sped up comprehension.
Profile Image for Ruben.
1 review
June 16, 2018
While the research and knowledge required to write the book are impressive, the presentation is not.

The book looks like some high school homework poorly written and composed in MS Word. Small simple diagrams are stretched to full page width, leaving big empty gaps when the images can not fit in the current page. The way it is structured feels unbalanced, going in depth on some topics while barely scratching the surface of others. Sometimes I felt it was just randomly jumping between topics. The meaning of some sentences was hard to grasp, and the text was plagued with typos.

Feels like the first draft, before being sent to the editor for review, of what could be a great book. Too bad for the current price tag (£32.59).

If the text went through some proper editing by a professional technical publisher it would easily be a 4 or 5 star book, but in its current shape only the recognition of the effort to shed light on an obscure and hard to understand engine pushed the rating above 1 star.
210 reviews10 followers
November 5, 2017
I can't believe I actually finished this book. After months of anticipating for the release of this book I did my very best to read it extremely sloooooow (I even mixed it with re-reading Masters of Doom). This book is awesome in all dimensions awesome can possibly extend. And I sincerely hope that Fabian Sanglard is able/interested/working (hurry up man !) in actually building up a series describing the ID engines.
Everyone who has ever played wolf3d has no excuse not to read to book to understand what kind of gamechanger wolf3d actually was and how it was technically ahead of its time.
Profile Image for Chris.
13 reviews6 followers
September 18, 2017
A wonderful book for anyone wants to jump back to the 90s and discover how id Software invented the first FPS of game history. The book is worth its price just for the wonderful 2-page explanation of the floating point calculations, and for the tricks created by id Software to work around PC and VGA limitations. You may find interesting way of approaching problems, even by modern engineering standards.

If you are a programmer, Game Engine Black Book MUST be on your shelf.
Profile Image for Roman.
140 reviews80 followers
December 25, 2017
What a great book. Remind me highschool years with this game and hardware. A lot of cool hacks by John Carmack when he was struggling with limitations of hardware that era - neither double buffering nor API for sound cards. Fabien did an amazing job and reverse engineered all of the code in order to explain these hacks e.g ray casting. If you like Masters of Doom you might like this book as well even if is much more technical.
Profile Image for Tim.
Author 6 books36 followers
December 11, 2017
The meat of the book, ie the engine part, felt a bit sparse compared to the amount of detail in the (very interesting) chapter on the hardware of that era. Its a first version for sure, with lots of typos and strange typesetting changes here and there. However, I had lots of (nostalgic) fun reading this book!
Profile Image for Justin Weiss.
Author 6 books14 followers
February 17, 2020
I was always much more into Doom than Wolf3D. This book almost changed my mind. There's something _so satisfying_ when you see a design so informed by constraints that it fits perfectly into. And that's what this book described. It's the kind of thing you only get when you get a tiny number of smart, very skilled people working closely together on something great. It's rewarding to see.

This was a technical book, filled with source listings. But I never felt lost. Everything was explained , images and diagrams came in at exactly the right places, I kept wanting to learn more.

Can't wait to read the Doom book.
43 reviews29 followers
January 11, 2019
Clearly a semi-professional publication and riddled with spelling and grammatical errors, but so much fun to read! This book is aimed squarely at geeks; probably best read if you're both into programming and have a history with PC gaming. Didn't understand all of what is described, but it is definitely an eye opener to the ingenuity required to write a 3D game in the early 90s on hardware that wasn't built for gaming, let alone 3D. Oh and now, 28 years later, I finally understand what I was doing when loading HIMEM.SYS... 😄
December 19, 2021
Fantastic book covering the limitations of computers in the era Wolfenstein 3D's game engine was programmed. Lots of code snippets and broad explanations of the kluges and tricks used to make the pseudo 3d world of WOLF3D come to life!

Be aware that this book is NOT a thorough walkthrough of the codebase and will likely not help you if you are looking to program a raycaster (Lode's tutorial online is probably your best bet)
16 reviews2 followers
September 17, 2017
Needed better editing, but very good overall. Was surprised to learn what emm386 actually did using v86. The book is printed in full color which is a nice touch. Hoping for more books from Fabien like this one.
Profile Image for John.
211 reviews52 followers
October 8, 2017
Surprisingly readable walkthrough of roughly 25 year was led game engine code. Lots of diagrams and clear writing makes it very understandable.

I hope he does more of these for the rest of the open sourced Id games.
Profile Image for Servaas.
84 reviews1 follower
July 24, 2022
An interesting look into the beginning of FPS gaming. What these people managed to do within the limitations of the devices of the time is simply amazing.

This book focusses a lot on the technical aspect of the engine. Some knowledge of assembly language and C is a big plus if you're reading this. Since my assembler knowledge is basic at best, I did not fully grasp most of these sections.

I will probably skip the sequel about the game Doom and read "Masters of Doom" instead. (I seem to recall that book being less technical)
Profile Image for Ivan.
143 reviews
July 3, 2019
Интересная книжка, в том числе и с инженерной точки зрения. С одной стороны, ожидал, что там будет больше подноготной; с другой стороны, подноготной там и так немало
194 reviews3 followers
October 26, 2017
Great trip down memory lane. I did my first graphics programming in mode 13 and mode X. The format of the book is well thought out. Starting with the hardware challenges and moving into the source after. I particularly liked the floating point description. Looking forward to the rest of the series!
Profile Image for Julian.
166 reviews
April 9, 2018
Reading the Wolfenstein 3D code when it came out was a landmark moment in my life (I even started a Linux SVGAlib clone that could read the original data files), and along with the Doom source that later followed, had a pretty big effect on me as a programmer. So seeing Fabien Sanglard's loving treatments of these codebases has been heartwarming for me.

This book is enjoyable, and nostalgic, but not as deep as I had hoped. Anyone interested in what DOS game development was like should certainly read it, and it makes a nice companion piece to the code, but there are greater pleasures to be found by going back to the original source. If only I could goodreads interesting sourcecode.
7 reviews2 followers
October 30, 2018
One of the most interesting technical books lately - it was really hard to put down.

This book goes into great detail about the challenges of developing games on mid-1990s hardware and how John Carmack and other genius developers at id software built games on it. If you've ever wondered how those games were built, fondly remember wrangling with HIMEM.SYS and figuring out which drivers to load so your game will work, or just want a really fun walk down memory lane - this is a great book to pickup.
Profile Image for Sander.
192 reviews1 follower
August 1, 2019
This made me install Borland C++ 3 point something in Dosbox to tinker around with drawing objects in VGA. If you understand what this means, this is an absolute must read, if you don't you probably won't care for it. Probably one of the best book on game development I've read.
Profile Image for Alb85.
307 reviews10 followers
October 29, 2021
Se sei un fan di Wolfenstein 3D questo libro fa al caso tuo.

È diviso essenzialmente in 3 parti: aspetti hardware, il team, e aspetti software.

L’autore descrive i problemi apparentemente impossibili che il team ha dovuto risolvere:
• Il sistema video (VGA) non è in grado di raddoppiare il buffer. Non era possibile avere animazioni fluide senza brutti artefatti ("tears") sullo schermo.
• La CPU poteva eseguire solo operazioni su interi, ma i calcoli 3D richiedevano di tenere traccia delle frazioni.
• L'altoparlante del PC, il dispositivo audio predefinito, poteva solo produrre onde quadre risultanti in una serie di "beep" che erano più fastidiosi di qualsiasi altra cosa.

L’autore descrive così quanto è stato difficile sviluppare a quel tempo Wolfenstein 3D:
“To say a PC was difficult to program for games would be an understatement. It was a nightmare. The CPU was good at doing the wrong thing, the best graphic interface allowed neither double buffering nor square pixels, the memory model only allowed 1 standard MiB with an address composed of two separate 16-bit registers, and the near/far pointers forbade using standard C. Last, but not least, the default sound system could only produce square waves and the people who did have a sound card installed could have any of the three major brands.”

Il libro contiene un sacco di curiosità, riguardanti il codice ma non solo:
- Non avevano un software di controllo versione.
- Lo sviluppo è stato fatto con Borland C++ 3.1 (ma il linguaggio usato era il C) che offriva una schermata 80x25 caratteri.
- Per sopperire alle dimensioni ridotte degli schermi CRT, alcuni sviluppatori ne usavano due.
- Lo sviluppo è durato quattro mesi e Wolfenstein 3D venne rilasciato nel maggio del 1992.
- Gli asset grafici sono stati creati direttamente con Deluxe Paint, non c’erano scanner ai tempi.
- A quei tempi non avevano i correttori ortografici negli editor… la parola "collumn" compare nel codice sorgente decine di volte.

Il libro è pieno di immagini:



L’ autore ha addirittura riprodotto la piantina della casa in cui il team ha lavorato (e non solo):



L’aspetto che mi ha incuriosito di più riguarda il rendering 3D basato sulla tecnica di raycasting: semplice ma efficace. L'idea centrale è quella di proiettare un raggio per ogni colonna di pixel visibile sullo schermo:

Questa tecnica viene spiegata molto bene da Daniel Shiffman (nel contesto 2D e nel contesto 3D).

Ho trovato interessante anche la descrizione sul comportamento dei nemici:
- Tutti i tipi di nemici (compresi i boss) hanno la propria macchina dello stato. Spesso condividono azioni (ad es. T_Stand e T_Path) ma occasionalmente ne hanno anche di proprie.
- Ciò che rende i nemici interessanti è il modo in cui passano da “in piedi” ad “aggressivi” tramite T_Stand. Hanno tre modi per rilevare il giocatore: Prossimità, Vista, Rumore. Di gran lunga gli stimoli più importanti, e ciò che fa sentire il giocatore come se l'IA fosse "intelligente", è la reazione al rumore.
- Ad ogni nemico vengono dati ordini specifici una volta che si accorge della tua presenza. Ad alcuni viene ordinato di attaccare immediatamente, mentre altri sono stati addestrati ad agire solo per contatto visivo.

Libro divertente. L'ho letto senza soffermarmi troppo sui dettagli implementativi.
1 review
January 15, 2018
There has always been a hacker community that wanted to make games using older technology. We can reference people rebuilding Doom for modern systems, making games for Atari, and others as an obvious sign of what is happening. Recently though, there have been books coming out to promote the subject.

I've nicknamed them historical engineers. They take the old technology and see what they can build with it. Game Engine Black Book: Wolfenstein 3D is one of the first books looking at old engines, and talking about the needs and problems someone would have at that time. Sanglard goes through the many difficulties of the time, and how a computer wasn't built to actually make a game. They used programming for various database programs and excell sheets to create a game. There were problems, and choices the creators had to test, and retest. It becomes a fascinating look at tech of that specific time.

Sanglard has made what he coined a chocolate Duke Nukem 3D. It can be run on a modern computer. He has also made comments on his website about other programs like Doom and Quake. Hopefully this means we can have a book on each engine, with the same amount of thought, and research as he has done for Wolf3D.

The biggest problem with the book is you have to be ready to read and understand code. Even when simply talking about coding decisions, there are points where you have to look up the terms he is using. It is a programming book for programmers who want to do some historical engineering. I had to reread parts to understand what he was talking about, because I lacked the knowledge. However, it was a joyous read, and I will be going back to it soon enough.

I think the greatest compliment I could give, was how much I wanted to try out the ideas in a simpler programming language like Scratch. I wanted to make something from it, and I think anyone else who reads this will too.
Profile Image for Jozef.
104 reviews1 follower
October 18, 2020
I remember when I was about 8 years old my friend showed me wolfenstein 3d on his dad's computer and it blew me away. How did they do that?! Well, going back to it is obviously a stark reminder of how far graphics have come since 1991.

The book is basically the optional audio guide you buy when visiting the museum that is the wolfenstein 3d source code. It's really cool to discover how this game was actually put together, but wow is it dated! The algorithms and principles are all pretty solid, but so much of it is based on a dated 16-bit DOS stack and ancient drivers. This book serves as a wonderful explanation for why exactly the code is written this way, which I think is honestly perfect. Anyone can do their own digging into the code beyond that. This requires brushing up on a bit of C and assembly, but I don't think people without some knowledge in that would approach this book anyway.

Besides these relics, it's actually quite charming how small this code is. It's probably the nostalgia talking but it felt like games used to be labors of love back then, less about shareholders. The book could really use a bit of an edit, there are a lot of minor errors, but the foundation is solid.
Profile Image for Dwayne Hicks.
436 reviews7 followers
October 5, 2022
You have to take this as a self-published book containing content from the blog of a guy who speaks English as a second language. This isn't a coffee table book or a collector's item - it's a practical, honest, naive (in a charming way) book in the tradition of early id itself. Lots of smarts, enthusiasm, but rough execution. (How about that fingerprint magnet cover? I read mine once with tea and biscuits and it's a mess!)

Anyway, the form is lacking. The substance is great. It's fascinating to read about how closely coupled the software was to the hardware. The tricks and hacks involved are both humorous and delightful. And for any programmer, there's a simplicity and ingenuity to the problems posed by a 'simple' 3D game like Wolf. You can get your teeth into the total program in a way you can't with modern engines and their baroque pipelines requiring serious academic mathematics.

Fabien has a knack for diagrams if not explanation, and if you're wanting to dig in deep then you'll be fine doing some of your own legwork on the more confusing concepts behind VGA memory, etc.
Profile Image for Michael Van.
26 reviews2 followers
July 29, 2024
This book has a bit of an identity crisis going on... Is it aimed at the computer scientist or is it aimed at the hardcore retro-videogame enthusiast? In some places the book is way too complex and opaque and in other places too much real-estate is spend to explain trivial concepts. I would also have liked that Fabien would have spend more time explaining the core raycasting algorithm. Some technical background is needed and it does help if you've done some light programming work in the past. Regardless, the book forces you to investigate further and in 2024 there are simply not enough books that accomplish this.

Keep in mind that this book looks and feels like a self-published work and could have benefited from a part-time editor (I'm reviewing version 2.2). There are some weird sentences sparkled around and I did find two spelling mistakes... But, Again, if you have no problems with that, this book is an excellent reminder that Carmack and friends really did something special when they programmed Wolfenstein 3D in the early 90s.
Profile Image for Hank.
31 reviews
May 23, 2021
Absolutely loved this book! Lots of details about the development of the game but more importantly the how and why of optimization decisions which only made sense for the platform it was developed on or to get around limitations of the time. Comments from Carmack and others years later on things they wince at as being naive or things they wince at as being bad things to do with later computers also was well done. Anyone into retrocomputing down to the nitty gritty level will enjoy this book. If you haven't read Masters of Doom yet you should. It is a great companion to the book which covers lots of the time before and after the period addressed here but in a much broader level of detail and therefore with less depth on the algorithms and code itself.
Profile Image for Ramon van Dam.
421 reviews7 followers
August 14, 2022
Quite an interesting book about the history and inner workings of Wolfenstein 3D, a very important landmark in the history of video games. The author goes quite in-depth and not only explains many parts of the game engine, but also describes typical hardware from the early '90s so that we understand just what the guys id Software had to work with - especially the many limitations.

I'd only recommend this to readers who are familiar with and enjoy coding. If you are just looking for something generic about the game, this will probably be pretty boring. But if you want to find out just how Carmack implemented ray casting, what differences there are on different platforms and some details on things like the AI, sound and map design, you can definitely pick this one up.
Profile Image for Bouke.
170 reviews33 followers
July 12, 2019
Very understandable deep dive into various sections of the Wolfenstein engine. The author is very good at visually explaining the hardware situation developers in the late 80s/early 90s had to deal with, and what kind of crazy tricks they had to invent to get the game up to a decent frame rate. My favorite technique was (mis)using the VGA bank mask to be able to write multiple pixels at the same time, halving the amount of memory writes a typical scene needed to do. I went through it in a couple hours.

I’d recommend getting the PDF for free from
http://fabiensanglard.net/gebb/index.... and then donating to the author.
67 reviews1 follower
November 14, 2017
This book brought back some great memories of my first foray into graphics and games. I still remember the assembly code for setting latches to change VGA modes...

There are some great little tricks that are talked about in detail, and even though the codebase is 20+years old, they are still useful to work through. His section on floating point is more succinct and to the point than any reference book or blog post trying to explain it.

Highly recommended for anyone who's interested in where game programming started.
Displaying 1 - 30 of 66 reviews

Can't find what you're looking for?

Get help and learn more about the design.