No description
  • Rust 62%
  • JavaScript 25.4%
  • Fluent 8%
  • Python 2.5%
  • HTML 2.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-05 22:46:17 +02:00
.cargo root commit 2026-10-05 22:46:17 +02:00
assets root commit 2026-10-05 22:46:17 +02:00
port/defender root commit 2026-10-05 22:46:17 +02:00
sounds-src root commit 2026-10-05 22:46:17 +02:00
src root commit 2026-10-05 22:46:17 +02:00
tests root commit 2026-10-05 22:46:17 +02:00
.gitignore root commit 2026-10-05 22:46:17 +02:00
Cargo.lock root commit 2026-10-05 22:46:17 +02:00
Cargo.toml root commit 2026-10-05 22:46:17 +02:00
package.py root commit 2026-10-05 22:46:17 +02:00
pstatus.md root commit 2026-10-05 22:46:17 +02:00
README.md root commit 2026-10-05 22:46:17 +02:00

Dark Defender

An audio side-scroller for blind players, after the 1980 Williams Defender: fly left and right over a planetoid, shoot the abductors before they carry its humanoids off, catch the ones that fall. A native port of the HTML5 / Electron game in port/defender (Guillem León) onto the audiogame engine, English and Spanish.

Modes

mode what it is
Classic The original game: one enemy bullet costs a ship, 3 ships, levels, motherships every second level.
Armored A 5-point hull instead of one-hit deaths; ramming (both ways) damages both ships; X cuts the motors to dive onto enemies (ground crashes hurt, knocked enemies tumble into others); extra items: big shots, hull repair.
Tutorial Guided lessons on an empty planetoid (the original only said "Tutorial unavailable").
Offline battle The battle against bots (src/content/bots.rs), no network: 3 bots, one more for every bot you destroy (up to 30; bots destroyed by bots or crashes just respawn), respawns, power-ups for everyone, 2–30 min or no limit, easy/normal/hard bots, Escape pauses. Bots press the same keys a player does, react only every few tenths of a second, misjudge heights, fight each other too, and at most a third of them hunt you at once.
Online battle PvP for any number of players, joining at any time: defender ship or mutant ship (equal, only their sounds differ), shots, rams, dives, falling power-ups, timed matches (3/5/10/15 min or no limit), results with stats.
Online co-op The team flies the real game together (armored rules): clear each planetoid and rescue the humanoids; teammates' collisions hurt; a shared pool of ships.

Keys

Arrows left/right heading · Page Up/A, Page Down/Z speed · 1–5 preset speed · Up/Down climb and dive · Space fire · Shift turbo · F hyperspace · B smart bomb · X (held, armored/online) motors off · C your position · M every enemy · S score · L level · I inventory · H position · Escape pause (online: twice to leave) · online: P players, K room code · tutorial: R repeat lesson.

Height of sounds

y is height here, never depth. Settings → Height of sounds:

  • pitch (default): the original — higher pitch is above you, plus pan and volume (position2D in the old classes.js).
  • spatial: Steam Audio HRTF with the playfield as a wall 8 units in front of you (left/right is azimuth, up/down is elevation), same loudness falloff.
  • both: spatial placement plus the pitch shift.

Building

Needs the engine checked out next to this folder (../audiogame-engine) and its toolchain (Rust, CMake, a C++ compiler, libclang). The build shares the engine's target directory (.cargo/config.toml).

cargo run                    # play
cargo test                   # sim, battle, bots, co-op, smoke, strings
cargo test --test bots balance_report -- --ignored --nocapture   # bot balance numbers
python package.py --local    # release build + dist/defender_<os>.zip

Online play

src/net.rs: matchbox signalling at wss://signal.gomsen.com (override with AUDIOGAME_SIGNAL_URL) and short-lived TURN credentials from https://turn.gomsen.com/ice?app=defender. The signalling server (matchbox_server 0.14 behind Caddy, systemd matchbox-signal.service on the gomsen VPS) is live since 2026-10-01. cargo test --test live_net -- --ignored plays through it; for a local server (port 3536):

AUDIOGAME_SIGNAL_URL=ws://127.0.0.1:3536 cargo test --test live_net -- --ignored

Sounds

assets/sounds/game/*.flac are the original sounds. Everything new was made with genny; the batches are in sounds-src/ (genny render sounds-src/<group>/batch.json re-renders): voice/ (shield and Spanish item call-outs), hull/ (hull hit, ram, hull warning), dive/ (motors off/on, fall wind, ground crash, dive impact), powerups/ (big shot, repair, their call-outs). The menu music was converted from menuMusic.m4a to Ogg.