1
0
Fork
You've already forked igdoom
0
Experimental Doom engine fork partially written in / ported to Zig
  • C 60%
  • Zig 25.5%
  • C++ 14.3%
  • Makefile 0.2%
Find a file
2025年08月30日 19:35:47 +12:00
linuxdoom-1.10 Assimilate R_InitTextureTranslation() 2025年08月30日 19:35:47 +12:00
sndserv Screw it, clang-format time 2023年10月12日 14:06:53 +13:00
.editorconfig Add main.zig entry point 2023年10月12日 15:44:30 +13:00
.gitignore Update for Zig 0.14.1 2025年08月25日 15:12:23 +12:00
build.zig Assimilate the rest of r_main.c entirely 2025年08月29日 18:50:13 +12:00
doomsrc.txt Welp, I corrupted the Git history when trying to strip all trailing whitespace. Currently trying to get stuff to build without warnings. 2023年10月12日 14:03:25 +13:00
FIXME.txt Fix memory mismanagement by indicating blocks as free and detaching the pointers in a separate pass before actually freeing them 2025年08月30日 09:38:53 +12:00
gpl.txt Welp, I corrupted the Git history when trying to strip all trailing whitespace. Currently trying to get stuff to build without warnings. 2023年10月12日 14:03:25 +13:00
README.md Add mipmaps to planes 2023年11月06日 19:55:32 +13:00
readme.old Prepare for putting stuff on Codeberg 2023年10月26日 08:55:21 +13:00

igdoom: Experimental Doom fork written in / ported to Zig

WARNING: I haven't sorted out the GPL licensing compliance stuff yet - there's missing licence texts in a bunch of files. You should assume all *.zig files are under GPLv2-or-higher except for any build.zig files which I (GreaseMonkey) release into the public domain.

How does one use this thing?

You will need Zig 0.11.0 to build this.

As a fork of the original Linux source code release (with the 1999 GPLv2+ relicensing), you will need development libraries for Xlib, Xext, and libnsl. You will also probably need ALSA development libraries (libasound), unless you want to change some settings for the sound server to use OSS.

Using Windows? After all the changes that were done to 10 and 11: Why?

(there will be GDI support when I get around to it)

Engine changes

  • Port a bunch of stuff to Zig
    • As an added bonus, when this crashes you get a backtrace with source code file+line+col information
  • Make it work on 64-bit
  • Use ALSA instead of OSS for sound
    • OSS was working with aoss, but only in a 32-bit build. Porting it to ALSA was easier than I expected.
    • The OSS code should still be there and maybe functional with the appropriate build flags
  • Added 16bpp and 24bpp rendering support, both with scaling (Zig made this easy, C++ would also do the same)
  • Preliminary unused support for higher resolutions (I mean, it works, but it's not the default)
  • Various limits lifted:
    • MAXDRAWSEGS
    • MAXINTERCEPTS
    • MAXOPENINGS
    • MAXSEGS (this was rewritten to track open spaces instead of blocked spaces, which ends up being easier to understand)
    • MAXVISPLANES (note: if you don't want to lift this limit in your own engine, you can always just make it not crash as per what happens with a drawsegs overflow)
    • MAXVISSPRITES
  • Partial UMAPINFO support - if it's valid, it should at least parse, but the presence of this lump assumes you don't want any other maps
  • Linedef special handling is done declaratively
  • Partial Doom-in-Hexen map support - primarily based on the ZDoom wiki and sticking mostly to what's only needed for Doom, but happy to get a few other niceties in there
    • Doing Doom-in-Hexen allows for quite a bit of flexibility without kludging in yet another pile of linedefs.
    • Not sure if I'll shove ACS and/or Polyobj in later. Knowing that I'm working on getting slopes working, I suspect they're going in anyway.
  • All in-WAD acceleration structures (NODES, SEGS, SSECTORS, BLOCKMAP, REJECT) removed and replaced with dynamic acceleration structures
    • nuts.wad works great on my machine (THINGS are tracked in a quadtree, LINEDEFS are a TODO)
    • gothic99.wad works great on my machine (segs generated from linedefs, then topological sorting is performed via a "front buffer" - think of a "z buffer" but indicating which seg is in front at a given spot)
    • ...OK, my machine uses a 7950X3D CPU. But trust me, getting everything to work at 35 FPS required effort!
    • There are a couple of extra flags for messing around with this, try -speen (spins the map) or -dentist (player pushes vertices around). Will probably desync on a net game.
    • Note that if you're out of bounds, you get treated as being in sector 0.
  • Experimental support for slopes
  • Lightmap dithering (currently for planes only, segs are a TODO)
  • Mip-mapping (currently for planes only, segs are a TODO)

Be aware that there are bugs.

Also, you will definitely need more RAM than what Doom normally needs. But if you're reading this on a modern web browser, you will be fine. (And if someone mirrors this to GitHub, you can probably close that tab and then proceed to run 10 instances of this at once.)