Skip to main content

ASCIIquarium

An aquarium in your terminal.

ASCIIquarium is a Node and TypeScript port of Kirk Baucom's Asciiquarium (Perl, 2003). It keeps Joan Stark's ASCII art unchanged and replaces everything underneath it.

tip

The tank on the home page is this package running in the browser, inside a Ghostty terminal compiled to WebAssembly.

npm package@sister.software/asciiquarium
Source codegithub.com/sister-software/asciiquarium
LicenseGPL-2.0-or-later, inherited from the original
PublisherNirrius, LLC, doing business as Sister Software

What's different​

  • Depth of field. The original gives every fish a depth and uses it only for sort order. Here depth decides how a fish is drawn: near fish are sharp, full-colour ASCII; mid fish dim toward the water; far fish shrink to braille silhouettes drifting at half speed.
  • A subpixel plane. Under the sprites, a braille layer at eight times the resolution carries light shafts, drifting plankton and a dithered sand floor.
  • A drifting camera. The view pans sideways with parallax by depth, and the seaweed and castle wrap around, so the floor never ends.
  • Two old bugs fixed. Bright magenta is now reachable, and the sea serpent's right-facing eye highlight renders.

Usage​

Run it without installing:

bash
npx @sister.software/asciiquarium

Or add it to a project:

bash
yarn add @sister.software/asciiquarium
bash
asciiquarium --seed 42 # the same tank every time
asciiquarium --classic # the 2003 original: eight species, ASCII only
asciiquarium --dof off # flat depth, for comparison
asciiquarium --drift 0 # a parked camera
FlagDoes
-c, --classicClassic species only, ASCII only, no depth of field
-s, --seed <n>Seed the tank; the same seed is the same aquarium
--fps <n>Render cap, 1–120 (default 30)
--color <mode>truecolor, ansi256, none or auto (default auto)
--no-brailleTurn off the subpixel plane
--dof <mode>on or off (default on)
--day-length <s>Seconds per in-tank day; 0 pins noon (default 600)
--drift <n>Camera drift in cells per second; 0 disables it
KeyDoes
q, Esc, Ctrl+CQuit
p, SpacePause
rRedraw, recreating every fish
fFeed the fish
dToggle the camera drift

Credits​

Joan Stark drew nearly all of the ASCII art. Kirk Baucom wrote the original in Perl. Claudio Matsuoka contributed the extended species, backported from the Android live wallpaper.