An open API service indexing awesome lists of open source software.

https://github.com/pinguy/voidrunner

A native Linux procedural space-trader / combat game squeezed into a 32 KiB runnable.
https://github.com/pinguy/voidrunner

Last synced: 16 days ago
JSON representation

A native Linux procedural space-trader / combat game squeezed into a 32 KiB runnable.

Awesome Lists containing this project

README

          

# VOIDRUNNER

**VOIDRUNNER** is a native Linux procedural space-trader / combat game squeezed into a **32 KiB runnable**.

It is an Elite-flavoured tiny game experiment: dock, trade, equip your ship, launch into a generated solar system, survive the run, fight or avoid contacts, dock again, and keep pushing your commander forward.

The point is not just that it is small.

The point is that it is still recognisably a game.

> Current release artefact: **32 KiB class**.
> The fullscreen BCJ+tight-stub build measured **32,760 bytes**, leaving **8 bytes** under the 32 KiB line.
> Earlier builds lived in the 40K class; this is now a proper 32K-class release.

## Screenshots

| Title | Command Slate |
| --- | --- |
| ![VOIDRUNNER title screen](screenshots/title.png) | ![VOIDRUNNER command slate](screenshots/station-command.png) |

| Market | Galaxy Map |
| --- | --- |
| ![VOIDRUNNER market screen](screenshots/market.png) | ![VOIDRUNNER galaxy map](screenshots/galaxy-map.png) |

| Launch Run | Hostile Route |
| --- | --- |
| ![VOIDRUNNER launch flight](screenshots/flight-launch.png) | ![VOIDRUNNER hostile route combat](screenshots/hostile-route.png) |

| Void Transit |
| --- |
| ![VOIDRUNNER jump tunnel](screenshots/jump.png) |

---

## What it is

VOIDRUNNER is a single-C-file native Linux game with no asset files.

Everything is generated or embedded in code:

* procedural star systems
* generated planet / station placement
* procedural station forms
* procedural ship contacts
* trading economy
* persistent commander state
* combat loop
* shield / energy survival model
* radar / scanner
* docked station menus
* title screen with seed / commander entry
* fullscreen launch
* tiny HUD / text renderer
* self-extracting compressed runner

The final runnable is a tiny shell self-extractor containing a compressed native ELF payload.

---

## Size claim

The current release build is a **32 KiB runnable**.

The size budget refers to the generated runner file, not the system libraries already present on Linux.

Expected direct ELF dependency for the checked GCC 9 build:

```text
NEEDED: libdl.so.2
```

The game still expects the usual Linux runtime pieces to exist on the target system, especially SDL2, OpenGL, and `xz` for the self-extracting runner.

Exact byte count can vary if rebuilt with different compiler, linker, binutils, shell, or xz versions. The release artefact is the measured target.

---

## Running

```sh
chmod +x ./VOIDRUNNER
./VOIDRUNNER
```

The game starts fullscreen.

Press `ESC` to quit from any screen.

---

## Building

A typical package contains:

```text
VOIDRUNNER
VOIDRUNNER.c
start_syscall.S
build_asm_syscall.sh
build_gcc9_bullseye.sh
tiny_tools/sstrip64.py
tiny_tools/source_prepass.py
toolchains/gcc9-bullseye/Containerfile
compat/
RUN_ME.sh
REBUILD_ME.sh
```

For the size-targeted rebuild:

```sh
sh ./REBUILD_ME.sh
```

That uses the bundled GCC 9 Bullseye wrapper, writes `./VOIDRUNNER`, and reproduces the checked runner on the reference setup.

The wrapper uses Podman and `toolchains/gcc9-bullseye/Containerfile`. Bullseye keeps `dlopen` / `dlsym` in `libdl`, so the checked build uses `-ldl`.

For host-toolchain experiments without the GCC 9 container:

```sh
OUT=/tmp/voidrunner-host sh ./build_asm_syscall.sh VOIDRUNNER.c
```

On newer glibc this can produce a `libc.so.6`-only raw ELF, but it is not the measured 32 KiB release artefact.

---

## Controls

### Title screen

```text
ENTER start / launch commander
TAB switch name / seed field
BACKSPACE delete character
ESC quit
```

### Docked station menus

```text
0 command slate
1 market
2 equip ship
3 data on current system
4 manifest
J chart / route map
F launch
BACKSPACE back / command
ARROWS menu navigation / buy / sell where applicable
ENTER confirm where applicable
ESC quit
```

### Flight

```text
WASD thrust / strafe
Mouse look
Q / E roll
SHIFT boost
LMB fire laser
SPACE fire laser fallback
RMB fire missile
TAB target nearest contact
J chart / jump route
F dock when cleared
ESC quit
```

---

## Survival model

VOIDRUNNER uses a simple shield / energy model.

Your shield absorbs incoming hits first.

Once the shield is gone, hits chew directly into ship energy. When energy reaches zero, the run ends.

That is the only death condition. No fake hidden hull bar, no decorative damage number pretending to matter.

---

## Why it got small

```text
custom _start removes CRT startup baggage
strip removes symbol/debug baggage
sstrip removes ELF section headers
x86 BCJ filter makes call/jump targets compress better
LZMA/XZ tuning improves payload compression
tight shell stub trims wrapper bytes
single C file gives the compressor one dense code corpus
feature discipline keeps only what earns its bytes
```

The x86 BCJ filter was a major free win: it rewrites relative call/jump targets into a form that LZMA can compress more effectively.

Assembly was only useful where it proved smaller.

Cargo-cult assembly was rejected.

---

## Status

VOIDRUNNER is playable, experimental, and deliberately ridiculous.

It is small enough that an ordinary screenshot can be larger than the game itself.

That is the joke.

That is also the achievement.