Post
Post
Mattias Gustavsson đź’– on X: "Have you ever thought about playing around with the original DOOM source code? I'd recommend it, it is really nice. But if you grab the original source code release, it is not very easy to get it to build. So I wanted to share this quick fix-up for it, making it easy to build"
The repo is here: github.com/mattiasgustavs… and to build it, you just go: cl doom.c or tcc doom.c no need to install any dependencies or use any build systems. This version is for windows and wasm, but might not be too difficult to port to mac/linux
I also made it so you can build it for WebAssembly, so you can run it in a browser. Try it here: mattiasgustavsson.com/wasm/doom-crt Full instructions for building for WASM is in the README in the repo (it is just another one-liner, and a build tool you just download and unzip).
One cool thing about the web build, is that if you just open it in your browser mattiasgustavsson.com/wasm/doom-crt and then just save the html file, you get a single, fully self-contained html file that you can run locally. And it is about the same size as the doom.exe+doom1.wad. Cool!
And one thing I specifically wanted to do for this, is to make it as an actual fork from the id Software github code for DOOM github.com/id-Software/DO… I didn't move files around, or change thinsg if I didn't need to. And all changes I did can be seen in the history.
If you want to learn more about how DOOM works, how the code and engine is structured, and just in general want a really good read, I really recommend Game Engine Black Book: DOOM by
@fabynou, available here: fabiensanglard.net/three_books_up… It is really great, as is his other books
And if you want to know more about the people who made the game, I whole-heartedly recommend Doom Guy: Life in First Person by
@romeroavailable here: romero.com/shop/p/doomguy It is a very enjoyable read!

