"Anarch", a new, public-domain Doom-like game coded from scratch in <256K

I've argued that the video-game "Doom" is a sort of cultural version of Turing Completeness. Given that we're jamming computers and screens into just about any device these days, inevitably (and delightfully) someone gets it to run Doom: Watches, digital cameras, ATMs, pregnancy sticks.

But you know what's even cooler? Creating your own new, original game in the exactly style of Doom, and making it so wildly resource-efficient that it fits in under 256K and will run on just about any computational device around.

That's what the programmer Miloslav Číž has done, with his new game "Anarch". You can play it in your browser here or download it here; I just blasted away in it for a while, and it's a hoot — he neatly channels the mechanics and twitchy low-rez aesthetics of the original. Gameplay trailer is here; he put it in the public domain, and the code is all here on Gitlab.

I particularly dig Číž's approach to thinking about the ecology of code. To help make sure Anarch runs anywhere, he wrote it without using any external dependencies, so it won't suddenly die when a third-party library isn't updated.

Also, not only is the code free for tinkering without restrictions, but he commented it really nicely, so any tinkerers know precisely what's doing what. (Seriously, I took a peek at his comments and they're a model of the craft. If more software was commented like this, the world of code would be considerably less of a mess.)

Anarch is, as Číž says, "made to last for centuries without maintenance". I wish more software projects aimed at that north star.

Some more screenshots …

His full list of specs:

Completely public domain (CC0) free softare, free culture, libre game for the benefit of all living beings in the Universe, no conoditions on use whatsoever. All art is original work and licensed CC0 (as well as code).
100% non-commercial, free of any ads, spyware, microtransactions, corporate logos, planned obsolescence etc.
Extemely low HW demands (much less than Doom, no GPU, no FPU, just kilobytes of RAM and storage).
Suckless, KISS, minimal, simple, short code (< 10000 LOC TODO).
Extremely portable (much more than Doom). So far officially ported to and tested on:
GNU/Linux PC, SDL and csfml
GNU/Linux PC, terminal
Pokitto (220 x 116, 48 MHz ARM, 36 KB RAM, 256 KB flash)
Gamebino Meta (80 x 64, 48 MHz, 32 KB RAM, 256 KB flash)

Has completely NO external dependencies, not even rendering or IO, that is left to each platform's frontend, but each frontend is very simple. Uses no dynamic heap allocation (no malloc).
Can fit into less than 256 kb (including all content, textures etc.).
Uses no build system, can typically be compiled with a single run of compiler (single compilation unit).
Works without any file IO, i.e. can work without config files, save files, all content and configs are part of the source code.
Doesn't use any floating point, everything is integer math (good for platforms without FPU).
Written in pure C99, also a subset of C++ (i.e. runs as C++ as well, good for systems that are hard C++ based).
Made to last for centuries without maintenance.
Goes beyond technical design and also attempts to avoid possible cultural dependencies and barriers (enemies are only robots, no violence on living beings).
Created with only free software (GNU/Linux, GIMP, Audacity, gcc, Vim, …).
Single compilation unit (only one .c file to compile, very fast and simple). No build systems.
Uses a custom-made 256 color palette (but can run on platforms with fever colors, even just two).
Well documented and commented code, written with tinkering and remixing in mind.
Has the oldschool feel of games like Doom or Wolf3D.