# gebbwolf3 and the TeX source behind the Game Engine Black Book

> This repository holds the LaTeX source for the Game Engine Black Book on Wolfenstein 3D, along with a Go build script that drives the whole toolchain, so the book can be compiled into PDF from source rather than only downloaded. The interesting engineering is the Go program that orchestrates Inkscape, LaTeX and the asset conversion, and the interesting constraint is that the drawings remain the author's property even though the text source is under the GPL.

**fabiensanglard/gebbwolf3** — Book about wolfenstein 3D

- Repository: https://github.com/fabiensanglard/gebbwolf3
- Stars: 557 · Forks: 65
- Language: TeX
- License: not declared
- Published: 2026-10-22 · Updated: 2026-10-22 · Language: en
- Canonical page: https://hysenlabs.com/projects/fabiensanglard-gebbwolf3

## What the repository is, and what it is not

The repository description is a single phrase, a book about Wolfenstein 3D, and the README expands it: this is the source code for the Game Engine Black Book: Wolfenstein3D.

That is the whole project. There is no engine, no game and no library here. What is here is the LaTeX source of a published book, with the figures, the fonts and the tooling needed to rebuild it.

The primary language listed is TeX, and the top-level entries match that: a src/ directory holding the book source, fonts/ for the typefaces, cover/ for the cover artwork, tools/ for helper scripts, a build.go at the root, a make.sh wrapper, and a .gitignore.

The audience is two groups, and they want different things. The first is a reader who wants to read the book, either as a PDF or as typeset source they can browse, and who might want to correct a typo or pull a passage into their own notes. The second is a LaTeX author or typesetter who wants to see how a book of this scope is put together, which is why the build tooling is in the repository rather than just the .tex files.

The repository is not archived and the last push was on 2026-05-18. There are no GitHub releases, and the licence is not stated in the repository metadata, which matters more than it normally would because of how the licensing is split.

Fabien Sanglard is the author, and the Game Engine Black Book series is a well-known set of technical books about the engines behind classic shooters. The particular constraint of this one is the artwork, and the README states it directly: the source code in .tex is released under the GPL, while the author retains ownership of all drawings and only provides them so the overall thing is compilable.

## The split licence, and what it means for the figures

The licensing arrangement deserves its own reading, because it is unusual and it is easy to misread from the top-level metadata.

The .tex files are under the GPL. The drawings are not. The author retains ownership of them and provides them solely so the book can be built. In other words, the text is free software in the GPL sense, and the figures are copyrighted works you are permitted to use for the purpose of compiling this specific work.

That is a different thing from an open source repository whose entire contents carry one licence. If you fork this and change the book, the text you write is GPL and the figures you inherited are still the author's. If you want to reuse a diagram in your own article or your own book, that is outside what this grant covers, whatever the licence of the text around it.

For most readers this is a non-issue, because the point is to build the book. For anyone planning to adapt the text, teach from it, or reuse a figure, it is the constraint that decides the approach, and it is the reason the README puts the sentence in the second paragraph rather than in a licence section.

The repository metadata field for the licence is one GitHub cannot classify, which is what a bare LICENSE file with a custom or partial grant tends to look like. The README's own words are therefore the authoritative statement of the terms, and they are short enough to quote: the source code is under the GPL licence, and the drawings remain the property of the author, provided only so the thing is compilable.

The practical advice that follows from this is narrow. If you want to read the book, build it. If you want to modify the text, modify the text. If you want the figures, that is a conversation to have with the author rather than something the repository grants.

## The toolchain: Inkscape, TeX Live and a Go build program

The build is driven by a Go program, build.go, with a make.sh wrapper, and the reason for that structure is the artwork.

The README states the hard requirement up front: for all systems, make sure you have Inkscape version v1.0.0 or above. If you do not, the conversion from SVG to PNG will fail. That is the single most important line in the document for anyone building the book, because the failure is in the asset pipeline rather than in LaTeX, and the error message will not obviously point at the version.

The figures in the repository are SVG, and the book embeds them as PDF, so the SVG has to be rasterised or converted on the way in. The tools/ directory and the Go program exist to drive that conversion and the LaTeX passes.

The Linux instructions are the shortest. Install Inkscape and the TeX Live library, for epstopdf and pdflatex, with:

```bash
sudo apt install inkscape texlive texlive-font-utils texlive-fonts-recommended texlive-latex-extra golang-go
```

The package list tells you which TeX Live components the book actually needs: the base distribution, the font utilities, the recommended fonts, and the extra LaTeX collection. The last of those is the one people routinely miss, since a book with custom fonts and custom package use tends to need more than a minimal TeX Live.

Then the build itself is one command:

```bash
./make.sh
```

On macOS the dependency list is longer and has an unusual entry. Beyond Inkscape and the MacTeX library for epstopdf and pdflatex, the instructions say to install golang, and MacTeX can come from the installer or from Homebrew either with GUI as `brew cask install mactex` or without GUI as `brew cask install mactex-no-gui`. The no-GUI variant is the one to pick on a build server. The other macOS detail is that the inkscape binary has to be in your PATH, or symlinked to somewhere your PATH points to.

So the dependency set is: Inkscape 1.0.0 or newer, a TeX distribution with epstopdf and pdflatex, the fonts, and a Go toolchain to run the build program.

## Windows, and the CRLF trap

The Windows instructions are the shortest of the three, and the reason is the recommendation to use WSL1 or WSL2 and then follow the Linux instructions.

The instruction to clone the repository inside the WSL environment is the substantive part, and the explanation is given: cloning from Windows directly can cause issues due to CRLF line endings, which can prevent successful compilation.

That is a real and specific failure mode. Git on Windows will typically configure core.autocrlf to convert LF to CRLF on checkout, and a Makefile with shell commands does not always survive that, particularly when the recipe lines end with a carriage return that the shell treats as part of the command. The result is a build that fails in a way that points at the Makefile rather than at the line endings, which is why the README heads it off explicitly.

The same class of problem applies to any mixed-environment repository with a build script, and it is the reason a growing number of projects tell Windows users to work inside a Linux environment rather than in a native toolchain.

There is also a note about the Go requirement, which is consistent across all three platforms. build.go is the build program, and without a Go toolchain there is no build. The Linux package list includes golang-go for that reason, and the macOS list says to install golang with a link to go.dev.

One thing the README does not mention is the LaTeX distribution on Windows, because the recommended path sidesteps it: inside WSL you are running the Linux instructions, and those say to install the TeX Live packages with apt. That is a heavier setup than a native Windows TeX install, but it keeps one build path rather than two, and it avoids the line-ending problem entirely.

## Speeding up the build, and how the source is organised

Compiling a book of this size is slow, and the README offers two ways to shorten it, which together tell you how the source is laid out.

The first is to build with `./make.sh debug`, which uses 100 DPI assets. The second is to comment out the part you are not working on in src/book.tex. The implication of the second instruction is clear: book.tex is a master file that pulls in the chapters, so removing a chapter from the include list removes it from the build. That is the standard LaTeX book structure, and it is the reason the build can be scoped down to the chapter you are editing.

The 100 DPI point is a separate optimisation. The high-resolution assets are what make the book look right in print, and they are expensive to convert from SVG to PNG. A debug build with lower resolution assets converts much faster, which is the right trade when you are checking whether a paragraph compiles and the wrong trade when you are checking how a figure looks.

The repository layout supports this. src/ holds the book, with book.tex at its root as the entry point, and the chapters alongside it. cover/ holds the cover artwork, which is presumably processed separately from the interior figures. fonts/ holds the typefaces, which is why the TeX font packages are in the install list. tools/ holds the helper scripts, and it is worth a look before you start, because the Go program and the shell tools together are the actual build system, and the .tex files are only half of it.

The overall design decision is worth noting for anyone who has built a graphics-heavy LaTeX document before: the figures are kept as vector sources in the repository and converted as part of the build, rather than being committed as pre-rendered PNGs. That keeps the repository small and the figures editable, at the cost of making the build depend on a specific Inkscape version and on the SVG conversion working at all.

## Where this repository is the wrong tool

Three limits are worth naming.

The first is that this is not a reader-friendly format if your goal is reading. A book split into a master file, per-chapter includes, an SVG figure set, a custom font directory and a Go build program is a source tree, and reading it means either building the PDF or reading raw LaTeX with no rendered figures. If you want to read the Game Engine Black Book on Wolfenstein 3D, the built book is the better artefact, and this repository is the way to get it only if you have the toolchain.

The second is the toolchain weight. Inkscape 1.0.0 or newer, a TeX distribution with several extra collections, a Go toolchain, and on Windows a WSL installation, is a substantial setup for a document that a reader will consume in an afternoon. That cost is fine if you want to build it once, and it is a real obstacle if you wanted to typeset a single chapter to read it.

The third is the artwork licence, discussed above. The GPL covers the text, and the figures are the author's, provided so the book compiles. That is a sensible arrangement for the author and a narrow one for anyone else, and it means the repository is not a source of reusable assets even though the text is open.

The alternative to rebuilding the book is simply to read the published edition, which is what the toolchain exists to reproduce. The alternative to using the figures is to draw your own, which for a book about the internals of a raycasting engine is a reasonable thing to do anyway, since the point of most of the diagrams is to explain the mechanism rather than to document one specific codebase.

## Conclusion

gebbwolf3 is a good fit for a reader who wants the Wolfenstein 3D engine analysis as typeset source they can read, edit and rebuild, or for a LaTeX user who wants to see how a book of this kind is assembled from SVG figures and chapter files. It is a poor fit if you want the finished book, since the whole point of the repository is the input to a build rather than the output, and a poor fit if you want to reuse the artwork, because the author retains ownership of the drawings and releases them only so the book compiles. Before starting, install Inkscape 1.0.0 or newer, because the README is explicit that without it the conversion from SVG to PNG fails, and note that the GPL grant covers the .tex source only, not the figures.

## FAQ

### What is the gebbwolf3 repository?

It holds the LaTeX source for the Game Engine Black Book: Wolfenstein 3D, along with the fonts, cover artwork, tools and a Go build program needed to compile the book into a PDF. The primary language is TeX.

### What do I need to build the Game Engine Black Book from source?

Inkscape version v1.0.0 or above, since without it the conversion from SVG to PNG fails, plus a TeX distribution with epstopdf and pdflatex, the TeX font packages, and a Go toolchain for build.go. On Debian and Ubuntu the command is `sudo apt install inkscape texlive texlive-font-utils texlive-fonts-recommended texlive-latex-extra golang-go`.

### How do I compile the book on Linux?

Install the dependencies, then run `./make.sh` from the repository root. The build is driven by a Go program at build.go, with make.sh as the wrapper.

### Can I build the book on Windows?

The README says to install WSL1 or WSL2 and clone the repository inside the WSL environment, because cloning from Windows directly can cause issues due to CRLF line endings that prevent successful compilation. Once inside WSL, follow the Linux instructions.

### How can I speed up the compilation?

Build with `./make.sh debug`, which uses 100 DPI assets, and comment out the part you are not working on in src/book.tex, which is the master file that includes the chapters.

### What licence applies to the gebbwolf3 source?

The .tex source code is released under the GPL licence, while the author retains ownership of all the drawings and provides them only so the book is compilable. The licence field in the repository metadata is one GitHub cannot classify.

## Sources

- [fabiensanglard/gebbwolf3 on GitHub](https://github.com/fabiensanglard/gebbwolf3)
- [Issues](https://github.com/fabiensanglard/gebbwolf3/issues)
- [README](https://github.com/fabiensanglard/gebbwolf3/blob/master/README.md)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/fabiensanglard-gebbwolf3
