← Back to DUKE

DUKE — Documentation

Version 0.2 · Last updated October 6, 2026

Getting started

Download DUKE for your platform and run it. Pass a file name to open it (for example duke notes.txt); a missing file simply starts a new buffer, and Ctrl+S or File > Save writes it.

The window keeps an 80x20 cell grid at any font size. The typeface is an embedded JetBrains Mono, so text is crisp and accents, Greek and Cyrillic render natively.

Controls

Just type — letters stamp into the buffer with a sound per key. Backspace turns the gunman left and swings a katana on the glyph behind; Delete turns him right and strikes. Hold either to auto-fire.

Ctrl+Backspace and Ctrl+Delete fire the shotgun at the word behind or ahead. Ctrl+K launches a rocket (emacs kill-line) and Ctrl+U rockets back to the start of the line. Ctrl+A and Ctrl+E teleport to the start and end of the line.

The arrow keys walk the gunman — he is the caret. Left-click walks him to that spot; right-click attacks a glyph directly. Enter splits the line and Tab inserts four spaces.

Tabs, files and undo

Ctrl+T opens a new tab and Ctrl+W closes the current one; click a tab to switch, or Ctrl+PgUp / Ctrl+PgDn to cycle (Ctrl+PgUp/PgDn). Each tab remembers its own file, caret position and undo history.

Ctrl+Z undoes and Ctrl+Shift+Z or Ctrl+Y redoes. Undo history is unlimited, and Ctrl+O reloads the current file from disk.

Customising characters, sounds and fonts

Every character is a folder of PNGs under sprites/ (duke, cyborg, demon, skeleton, ghost ship by default). Replace or add images and relaunch — each folder becomes a selectable character under Settings > Sprite Sheet.

Sound effects are plain WAV files in sounds/ (slash, pistol, shotgun, rocket, stamp, save). Drop in your own recordings with those names and they play immediately; missing files simply mean silence.

Settings > Font Size switches between 18, 24 and 30px while keeping the 80x20 grid.

Playing on a LAN

Host a session with duke -serve :3310 notes.txt, then a friend joins with duke -join 127.0.0.1:3310 -name SCARFACE. Press F2 to type a chat line; everyone sees chat bubbles above the gunmen.

The host owns the shared buffer, so edits sync through it (last-writer-wins). Undo and redo are offline-only while connected. A scripted bot is available with the -bot flag for testing.

Troubleshooting

If a character or sound does not change, confirm the file is in the expected sprites/<name>/ folder or sounds/ directory and relaunch.

On Linux, audio uses PulseAudio/PipeWire. If there is no output, check your audio server; missing sound files are silent and never block the editor.

For frame-by-frame debugging without interacting, run duke -dump shot.png notes.txt to render 90 frames to a screenshot and exit.

© 2026 Xyzzy Apps. DUKE documentation.