An aquarium/sea animation in ASCII art for your terminal
Project description
๐ Asciiquarium - Python Edition
๐ Website โข ๐ฆ PyPI โข ๐ Quick Start โข ๐ฌ Support
An aquarium/sea animation in ASCII art for your terminal! This is a Python reimplementation of the classic Perl asciiquarium, designed to work cross-platform on Windows, Linux, and macOS.
โจ Features
- ๐ Multiple fish species with different sizes and colors
- ๐ฆ Sharks that hunt small fish
- ๐ Whales with animated water spouts
- ๐ข Ships sailing on the surface
- ๐ Sea monsters lurking in the depths
- ๐ Animated blue water lines and seaweed
- ๐ฐ Castle decoration
- ๏ฟฝ Blue bubbles rising from fish
- ๐จ Full color support
- โจ๏ธ Interactive controls
- ๐ Cross-platform (Windows, Linux, macOS)
๐ Installation
Using pip (Standard)
pip install asciiquarium
Using pipx (Isolated)
pipx installs the package in an isolated environment:
pipx install asciiquarium
๐ฏ Usage
After installation, simply run:
asciiquarium
That's it! Enjoy your ASCII aquarium! ๐
๐ฎ Controls
Qorq- Quit the aquariumPorp- Pause/unpause the animationRorr- Redraw and respawn all entitiesIori- Show/hide info overlay
๏ฟฝ Requirements
- Python 3.8+ - Works with Python 3.8 through 3.14+
- Terminal - Any terminal with color support (minimum 40x15, recommended 80x24)
- Dependencies - Automatically handled:
windows-curses- Auto-installed on Windows (Python < 3.13)curses- Built-in on Linux/macOS
Python 3.13+ Support
For Python 3.13+ on Windows, you may need to install windows-curses manually:
pip install windows-curses
If you encounter issues, consider using Python 3.12 or earlier for the most stable experience.
๐ Platform Support
| Platform | Status | Notes |
|---|---|---|
| ๐ช Windows | โ Fully Supported | Auto-installs windows-curses |
| ๐ง Linux | โ Fully Supported | Uses built-in curses |
| ๐ macOS | โ Fully Supported | Uses built-in curses |
๐ฆ What Gets Installed
The package includes:
- Main application and animation engine
- All entity types (fish, sharks, whales, ships, etc.)
- ASCII art designs and color schemes
- Cross-platform terminal handling
Size: ~50KB (minimal footprint!)
๐ ๏ธ Development Installation
If you want to contribute or modify the code:
# Clone the repository
git clone https://github.com/MKAbuMattar/asciiquarium-python.git
cd asciiquarium-python
# Install in editable mode with development dependencies
uv pip install -e ".[dev]"
# Run from source
python -m asciiquarium.main
Development Requirements
Before submitting any changes, ensure your code passes all checks:
# Run the formatter
uv run hatch run fmt
# Run linters (must pass without errors)
uv run hatch run lint
All contributions must pass both formatting and linting checks before being merged.
๐ Features Details
Cross-Platform Support
This implementation uses Python's curses library and automatically installs windows-curses on Windows systems, making it truly cross-platform.
Entity Types
- Fish: 7 different species with unique ASCII art designs and swimming patterns
- Sharks: Predators that hunt and eat smaller fish with collision detection
- Whales: Large creatures with animated water spout effects
- Ships: Sail across the surface of the water
- Sea Monsters: Mysterious creatures lurking in the depths
- Big Fish: Large colorful fish with randomized color schemes
- Environment: Seaweed, castle decorations, and blue water lines
- Bubbles: Rise from fish in blue color
Animation Features
- Smooth Animation: 30 FPS for fluid motion
- Z-depth Layering: Proper entity overlapping
- Color Masking: Detailed multi-color ASCII art
- Frame Animation: Multi-frame animations for complex entities
- Collision Detection: Sharks interact with small fish
- Auto Cleanup: Off-screen entities are automatically removed
๐ Project Structure
asciiquarium-python/
โโโ asciiquarium/
โ โโโ __init__.py
โ โโโ main.py # Entry point
โ โโโ entity.py # Base entity class
โ โโโ animation.py # Animation engine
โ โโโ entities/
โ โโโ __init__.py
โ โโโ fish.py # Fish entities
โ โโโ environment.py # Environment entities
โ โโโ special.py # Special entities (sharks, whales, etc.)
โโโ pyproject.toml
โโโ uv.lock
โโโ README.md
๐จ Customization
You can easily add new entities by creating them in the appropriate module:
from asciiquarium.entity import Entity
def add_my_entity(old_ent, anim):
anim.new_entity(
entity_type='my_type',
shape=my_ascii_art,
color=my_color_mask,
position=[x, y, z],
callback_args=[dx, dy, dz, frame_speed],
die_offscreen=True,
death_cb=add_my_entity,
)
๐ Troubleshooting
Command Not Found
If asciiquarium command is not found after installation:
On Windows:
# Add Python Scripts to PATH
python -m asciiquarium.main
On Linux/macOS:
# Make sure ~/.local/bin is in PATH
export PATH="$HOME/.local/bin:$PATH"
asciiquarium
Windows Issues
The windows-curses package is automatically installed on Windows. If you encounter issues:
pip install --upgrade windows-curses
Terminal Size
Minimum terminal size: 80 columns ร 24 rows
Check your terminal size and resize if needed.
Color Support
Most modern terminals support colors. If colors don't appear:
- Ensure your terminal emulator supports ANSI colors
- Try a different terminal (Windows Terminal, iTerm2, GNOME Terminal, etc.)
Python Version
Make sure you're using Python 3.8 or higher:
python --version
๐ก Tips
- Full Screen: Press
F11in most terminals for fullscreen mode - Better Experience: Use a larger terminal window for more entities
- Dark Theme: Works best with dark terminal backgrounds
- Font: Use a monospace font for best ASCII art rendering
๐ License
GPL-3.0-or-later
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
๐ Credits
Original Asciiquarium
- Author: Kirk Baucom
- Website: http://robobunny.com/projects/asciiquarium
- Language: Perl
Python Port
- Author: Mohammad Abu Mattar
- Email: info@mkabumattar.com
- Website: https://mkabumattar.com/
- Repository: https://github.com/MKAbuMattar/asciiquarium-python
All ASCII art designs and animation concepts are credited to the original author, Kirk Baucom. This Python port maintains the spirit and fun of the original while providing modern cross-platform compatibility.
๐ Links
- ๐ฆ PyPI Package
- ๐ GitHub Repository
- ๐ Author Website
- ๏ฟฝ Original Perl Version
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Made with โค๏ธ by Mohammad Abu Mattar
Based on the original Perl ASCIIQuarium by Kirk Baucom
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file asciiquarium-2.2.0.tar.gz.
File metadata
- Download URL: asciiquarium-2.2.0.tar.gz
- Upload date:
- Size: 35.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3599ab42d45c51636e4f3197ed3893ab98b9bf9f8c621dae2faabdf2bb9b9606
|
|
| MD5 |
a548b168990e3e1950a1a7ffa94f934c
|
|
| BLAKE2b-256 |
265df0f8c96f3b909c207e89f2e491fa7e6bf8201a141810ca68792f0d227626
|
File details
Details for the file asciiquarium-2.2.0-py3-none-any.whl.
File metadata
- Download URL: asciiquarium-2.2.0-py3-none-any.whl
- Upload date:
- Size: 37.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a63fe1088d4d985c5761736e9a33ceee8947e645f1e3c8fcd67608e63d7cb08
|
|
| MD5 |
dff45227fb870f2cb984fa329347782b
|
|
| BLAKE2b-256 |
631cc55066205b616f682da7235a809850cd1cfb78c4a229d36d8fafa5863184
|