Cavez of Phear: A Boulder Dash Clone for the Terminal

Some terminal games try to recreate twitch arcade experiences. Cavez of Phear takes a different approach — it's a slow-burn puzzle game about caves, diamonds, rolling boulders, and the ever-present threat of being crushed or eaten. If you ever played Boulder Dash or Digger, you'll feel right at home.
What is Cavez of Phear?
Cavez of Phear is an open source Boulder Dash-style game for consoles and terminals. The goal is simple: collect all the diamonds in each cave level to advance toward freedom. The execution, however, involves careful planning — boulders roll, monsters roam, and a single wrong move can bring the ceiling down on you.
The game was originally created by Tom Rune Flo (v0.5.1, 2011) and is currently maintained by Dmitry Marakasov (AMDmi3). The latest release is 0.6.2, published in September 2025. It's licensed under the GNU General Public License v3.
Gameplay
You navigate underground caverns using the arrow keys, digging through dirt and collecting items:
| Symbol | Item | Points |
|---|---|---|
* |
Diamond | 10 pts |
$ |
Money | 100 pts |
% |
Bomb | — |
M |
Monster | danger! |
Collect all the diamonds in a level to unlock the exit to the next cave. Earn an extra life for every 1,000 points scored.
The twist: physics. Boulders and stones obey gravity — they roll off rounded surfaces and fall when unsupported. Dig carelessly and you'll get crushed. The bombs add another layer: pick them up, place them with b, and detonate everything at once with t. Bombs are also subject to physics, so placement matters.
Controls
| Key | Action |
|---|---|
| Arrow keys / Numpad (2-4-6-8) | Move |
b |
Place bomb |
t |
Detonate all bombs |
k |
Self-destruct (restart if stuck) |
s |
Toggle sound |
w |
Highlight your position |
Built-in Level Editor
Cavez of Phear ships with a map editor. Launch it with:
phear -e <mapfile>
Use numeric keys to place objects and build your own caves. Great for sharing custom levels.
Installing Cavez of Phear
The game is built with CMake and written in C, so it compiles cleanly on any Unix-like system.
Linux
From your package manager:
# Debian/Ubuntu
sudo apt-get install cavezofphear
# Arch Linux (AUR)
yay -S cavezofphear
# Fedora
sudo dnf install cavezofphear
Build from source:
Install the dependencies first:
# Debian/Ubuntu
sudo apt-get install cmake gcc libncurses5-dev
# Fedora/RHEL
sudo dnf install cmake gcc ncurses-devel
# Arch Linux
sudo pacman -S cmake gcc ncurses
Clone the repository and build:
git clone https://github.com/AMDmi3/cavezofphear.git
cd cavezofphear
cmake .
cmake --build .
./phear
For a system-wide install:
cmake -DSYSTEMWIDE=ON .
cmake --build .
sudo cmake --install .
phear
macOS
Install the build dependencies via Homebrew:
brew install cmake ncurses
Then clone and build:
git clone https://github.com/AMDmi3/cavezofphear.git
cd cavezofphear
cmake . -DCMAKE_PREFIX_PATH="$(brew --prefix ncurses)"
cmake --build .
./phear
For a system-wide install:
cmake -DSYSTEMWIDE=ON -DCMAKE_PREFIX_PATH="$(brew --prefix ncurses)" .
cmake --build .
sudo cmake --install .
Why Play Cavez of Phear?
Most terminal games go for action. Cavez of Phear rewards patience and spatial thinking. Every level is a small puzzle: where do the boulders fall? Which path clears the diamonds without trapping you? When do you use a bomb versus digging around a monster?
It's a game you can play in a terminal over SSH, in a tmux pane, or on a server with no display. It's lightweight, thoroughly enjoyable, and scratches a very specific retro itch. The active maintenance (latest release: September 2025) means it builds cleanly on modern systems without fighting your toolchain.
Source code: https://github.com/AMDmi3/cavezofphear