A terminal-based roguelike dungeon crawler built in Python. Procedurally generated dungeons, turn-based combat, permadeath, and a Linux-themed sense of humor.
You don't have permission to die. Or do you?
- Procedurally generated dungeons — every run is different
- Turn-based combat — walk into enemies to attack
- Permadeath — one life, no saves, no second chances
- XP and leveling — gain stats from killing enemies
- Equipment system — weapons, armor, potions, and scrolls
- Enemy AI — enemies chase you when close, wander when far
- Multiple floors — descend deeper, face tougher enemies
- Linux-themed flavor text — sudo commands, process signals, and terminal humor
sudo snap install sudo-survivepip install sudo-survivegit clone git@github.com:myselfAbdullah007/sudo-survive.git
cd sudo-survive
pip install .
sudo-survivegit clone git@github.com:myselfAbdullah007/sudo-survive.git
cd sudo-survive
python3 -m sudo_surviveRequirements:
- Python 3.10+
- Terminal at least 60 columns wide and 30 rows tall
- A terminal that supports colors (most modern terminals do)
No external dependencies — uses only Python's built-in curses library.
| Key | Action |
|---|---|
W / Up Arrow |
Move up |
S / Down Arrow |
Move down |
A / Left Arrow |
Move left |
D / Right Arrow |
Move right |
G |
Pick up item |
I |
Open inventory |
> |
Descend stairs (when standing on >) |
? |
Help screen |
Q |
Quit |
| Symbol | Meaning |
|---|---|
@ |
You (the player) |
. |
Floor (walkable) |
# |
Wall |
+ |
Door (walkable) |
> |
Stairs down |
! |
Potion |
? |
Scroll |
/ |
Weapon |
[ |
Armor |
Letters (r, G, S, O, D, W) |
Enemies |
Combat is bump-to-attack: move into an enemy to hit it. Each attack deals damage based on your ATK minus the enemy's DEF, plus a small random bonus. Enemies attack back on their turn.
Every time you move, all enemies get a turn. Picking up items also costs a turn. Opening your inventory does not.
damage = max(1, attacker_ATK - defender_DEF) + random(0..2)
Pick up items by standing on them and pressing G. Open inventory with I and press the letter next to an item to use it.
| Item | Symbol | Effect |
|---|---|---|
| Minor Potion | ! |
Heals 10 HP |
| Major Potion | ! |
Heals 25 HP |
| Dagger | / |
+2 ATK |
| Sword | / |
+5 ATK |
| Battleaxe | / |
+9 ATK |
| Leather Armor | [ |
+2 DEF |
| Chain Mail | [ |
+4 DEF |
| Plate Armor | [ |
+7 DEF |
| Scroll of Fire | ? |
Damages all enemies within 3 tiles |
| Scroll of Warp | ? |
Teleports you to a random location |
Equipping a new weapon or armor automatically moves the old one back to your backpack. Inventory holds up to 10 items.
Enemies get tougher as you descend. Their stats also scale +10% per floor.
| Enemy | Symbol | HP | ATK | DEF | First Appears |
|---|---|---|---|---|---|
| Rat | r |
5 | 2 | 0 | Floor 1 |
| Goblin | G |
10 | 4 | 1 | Floor 1 |
| Skeleton | S |
15 | 6 | 2 | Floor 3 |
| Orc | O |
20 | 8 | 3 | Floor 3 |
| Demon | D |
30 | 12 | 5 | Floor 5 |
| Dragon | W |
50 | 16 | 8 | Floor 5 |
Killing enemies grants XP. When you gain enough XP, you level up:
- +8 Max HP (and current HP)
- +1 ATK
- +1 DEF
XP required per level increases as you progress.
- Use corridors — lure enemies into narrow passages so they come at you one at a time
- Don't hoard potions — there's no point saving them if you die
- Equip every upgrade — even small stat boosts compound over floors
- Scroll of Fire — devastating in rooms with clustered enemies
- Scroll of Warp — your emergency escape when surrounded
- Watch the HUD — if your HP bar turns red, you're in danger
sudo-survive/
├── pyproject.toml Package metadata and build config
├── snap/
│ └── snapcraft.yaml Snap package definition
├── LICENSE
├── README.md
└── sudo_survive/
├── __init__.py Package version
├── __main__.py python -m sudo_survive support
├── main.py Entry point, curses initialization
├── engine.py Game loop, input handling, turn processing
├── dungeon.py Procedural dungeon generation
├── entities.py Player and enemy classes, AI behavior
├── items.py Item definitions, inventory, equipment
├── combat.py Damage calculation, combat actions
├── renderer.py Terminal rendering, HUD, menus
└── constants.py Game configuration and balance values
sudo snap install snapcraft --classic
snapcraft
sudo snap install sudo-survive_*.snap --devmodeMIT License. Do whatever you want with it.