QUOD Is A Quake-Like In Only 64kB

A screenshot of the world's first 64kB boomer shooter

The demoscene is still alive and well, and the proof is in this truly awe-inspiring game demo by [daivuk] : a Quake-like “boomer shooter” squeezed into a Windows executable of only 64 kB he calls “QUOD”. We’ve included the full explanation video below, but before you check out all the technical details, consider playing the game. It’ll make his explanations even more impressive.

OK, what’s so impressive? Well, aside from the fact that this is a playable 3D shooter in 64kB, with multiple enemies, multiple levels, oodles of textures, running, jumping et cetera–it’s so Quake-like he’s using TrenchBroom to make the levels. Of course he’s reprocessing them into a more space-efficient, optimized format. Yeah, unlike the famous .kkrieger and a lot of other demos in the 64kB space, this isn’t all procedurally generated. [daivuk] did make his own image editing program for procedurally generated textures, though. Which makes sense: as a PNG, the QUOD logo is probably half the size of the (compressed) executable.

The low-poly models are created in Blender, and all created to be symmetric–having the engine mirror the meshes saves 50% of the vertex data. . Blender is just exporting half of a low-poly mesh; just as he wrote his own image editor, he has his own bespoke model tool. This allows tiling model elements, as well as handling bones and poses to keyframe the model’s animation.

Audio is treated similarly to textures and meshes: built up at runtime from stored data and a layered series of effects. When you realize all the sounds were put together in his sound tool from square and sine waves, it makes it very impressive. He’s also got an old-style tracker to create the music. All of these tools output byte arrays that get embedded directly in the game code.

The video also gets into some of his optimization techniques; we like his use of a map file and analyzing it with a python tool to find the exact size of game elements and test his optimizations thereby. One thing he notes is that his optmizations are all for space, not for speed. Except, perhaps, for one thing: [daivuk] created a new language and virtual machine for the game, which seems downright extravagant. It actually makes sense, though, as the virtual machine can be optimized for the limits of the game, as he explains starting at about 20 minutes into the video. Apparently it saved a whole 2kB, which seems like nothing these days but actually let [daivuk] fit an extra level into his 64kB limit. Sure, it’s still bigger than Quake13k–and how did we never cover that?–but you get a lot more game, too.

So, to recap: [daivuk] didn’t just make a game with an impressively tiny size on disk, he made the entire toolchain, and a language for it to boot. If you think this is overoptimized, check out Wolfenstien in 600 lines of AWK. Of course in spite of the 1980s file size, this needs modern hardware to run. You can get surprising graphics performance from a fraction of that, like this ATtiny sprite engine.

Thanks to [Keith Olson] for the tip, which probably took up more than 64kB on our tips line.

18 thoughts on “QUOD Is A Quake-Like In Only 64kB

  1. That is even smaller than .kkrieger by .farbrausch from the early 2000s, which was 96k.

    Though .kkrieger has better graphics. :p

  2. Stop saying “boomer shooter,” it’s the stupidest name for a genre yet. Just say “retro shooter,” as the author of the game describes it in the game description.

    1. “boomer” doesn’t refer to the people playing it, but because doom/quake were the “baby boom” era of the genre.

      Also “boom” as in a shotgun blast.

  3. And now think if our everyday normal programer could reach only 10% of this efficiency….

    What would this mean for the livetime of your mobile battery? The amount of powerplants we need?

    Good programing is art and crafts, in these days most programers are overpaid painter by numbers.

      1. Okay, let us look from the other direction…

        If we have an infinitely large KI, can it squeeze the complete universe in one simple number? And this number is 42?

    1. 100% of it is 64kb on disk, including all models and textures AND the VM that runs the code. It’s far, far larger in memory, however. I highly recommend his video, as he goes into the nitty gritty and it’s fascinating, IMO. The short version is he built a custom image editing program that relies almost exclusively on duplicating patterns, and what he saves on disk is the actual editor moves he made to create the asset, not the textures themselves. When you start up the game it literally creates the textures from scratch and saves them to memory, so they are thousands of times larger in memory than they are on disk.

      The textures are also layered, so if any textures share the same edit moves on any of the layers, he just references those moves, rather than saving them all over again. And of course, since he’s going for the minimum size possible, he tries very hard to duplicate as many layers as he can when designing the textures.

      3D models are similar, but he starts with a base model in Blender. But he only builds the parts of the model that can’t be mirrored across an axis, and his engine does the mirroring on startup. He also follows a similar pattern of shared bones and keyframes for animations, and he just scripts the specific differences in animation. Even with a custom model format that strips out everything that doesn’t apply to his models they are very expensive, however, so there are only 4 unique enemies and a handful of weapons in the game.

  4. Why say it isn’t procedurally generated like it’s predecessors, when it is OBVIOUSLY making heavy use of generated… Everything?

    This project is amazing in both the results and the methods used to achieve them.
    But it isn’t magic.
    It simply builds on the last generation of size-coded projects.

    And as cool as this project is, it’s less impressive than .kkrieger IMO, because modern platforms let you offload more things which lets you shrink “your” size down.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.