Skip to content
Arcade style game written in Zig
Branch: master
Clone or download
dbandstra randomly generate monster waves
replace the 20 or so canned wave configurations i had before

they now go on forever (or at least until the game crashes because it
ran out of spawn locations)
Latest commit 153093f Apr 23, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets replace spawn sound, add sound when monsters speed up Apr 22, 2019
src randomly generate monster waves Apr 23, 2019
zang @ 704fdd3
zig-hunk @ c457ac9 remove zigutils dependency, use new zig-hunk library Mar 17, 2019
zig-pcx @ 830cd44 try to upgrade to latest zig (not working yet) Mar 2, 2019
.gitmodules replace audio code, new synthesized laser sound Apr 13, 2019 update readme Apr 14, 2019 randomly generate monster waves Apr 23, 2019
build.zig replace audio code, new synthesized laser sound Apr 13, 2019
screenshot.png add screenshot to readme Aug 28, 2018
test.zig update for latest zig Apr 6, 2019


Oxid is an arcade-style game where you fight waves of monsters in a fixed-screen maze. This is more or less a clone of Verminian Trap (2013, Locomalito). Verminian Trap was originally inspired by Wizard of Wor (1980, Midway). Oxid is currently not nearly as fun as Verminian Trap, see for planned features.

Oxid is written in the Zig programming language.

How to play

  • Install SDL2 and libepoxy
  • Install Zig (get it from master, version 0.2.0 is too old)
  • Depending on your version of Git, you may have to explicitly update the submodules: git submodule init followed by git submodule update
  • zig build play

Game controls:

  • arrow keys: move
  • space: shoot
  • esc: leave game
  • m: toggle sound muting

Debug/cheat controls:

  • backquote: fast forward
  • return: skip to next wave
  • F2: toggle rendering of move boxes
  • F3: toggle invulnerability
  • F4: toggle profiling spam
  • F5: cycle through preserved graphics glitches




Oxid uses a minimalistic Entity Component System, which is certainly overkill for a game like this, but for me it's a experiment in itself.

Here are the main gameplay-related files:

The ECS framework itself is located in src/common/gbe/. It is small but quite rough and somewhat opaque as it involves a fair bit of metaprogramming.

Actually using the ECS requires very little boilerplate.

  • To add a component type, add a struct to components.zig and register it in game.zig.
  • To add an entity prototype, add a function to prototypes.zig.
  • To add a system, add a file to systems/ and import/call it in frame.zig.

Adding new graphics, sound effects, or input bindings is not as polished but still relatively easy. Documentation to come later.


Low-level graphics code was originally based on andrewrk's Tetris demo for Zig.

Sound effects from

Uses Dawnbringer's 16-colour palette.

Uses my zig-hunk and zig-pcx one-file libraries.

You can’t perform that action at this time.