A feature-complete, terminal-native roguelike game written entirely in R!
ROGUE is a fully-featured procedurally generated dungeon crawler that proves R can create deep, engaging games. With 50+ gameplay systems, 6000+ lines of code, and 8 character classes, this is the most comprehensive CLI game ever built in R.
โจ NEW: Real-time input support! No Enter key required with keypress package.
Core Features:
- โ๏ธ 8 Character Classes with unique abilities
- ๐ฏ Daily Challenges with 10 modifiers & global leaderboard
- ๐ Souls Shop - 20+ permanent upgrades
- ๐ 25+ Achievements with soul rewards
- ๐ฅ 8 Status Effects (Poison, Burn, Freeze, Bleed, etc.)
- โจ Item Rarities (Common โ Legendary) with procedural generation
- ๐ 7 Special Rooms (Shop, Shrine, Treasure, Challenge, etc.)
- ๐ชค 8 Trap Types with search/disarm mechanics
- ๐บ๏ธ Minimap & Auto-Explore
- ๐จ 6 Dungeon Themes with unique enemies/bosses
- ๐๏ธ Field of View with raycasting
- ๐ Permadeath roguelite mechanics with meta-progression
# Clone repository
git clone https://github.com/fabiandistler/Rogue.git
cd Rogue
# Install dependencies (optional but recommended)
make setup
# OR: R -e "source('setup.R')"
# Start game - pick your favorite method:
# Option 1: Simplest - using Makefile
make play
# Option 2: Using start script
./start.sh
# Option 3: Manual R console
R
> source("rogue.R")
> main()Requirements: R >= 3.6.0, ANSI-capable terminal, interactive R session
Recommended: Install keypress package for real-time input (no Enter key needed!)
install.packages("keypress")- Choose from 8 character classes
- Earn souls through achievements
- Unlock permanent meta-progression bonuses
- Compete on global leaderboard
- Seeded dungeon (same for everyone)
- Random modifier (10 types: Glass Cannon, Tank Mode, Speed Run, etc.)
- Separate daily leaderboard
- Extra soul rewards
- Resets every 24 hours
| Class | Icon | HP | ATK | DEF | Special Ability |
|---|---|---|---|---|---|
| Warrior | โ๏ธ | 120 | 15 | 7 | Battle Rage (double damage) |
| Rogue | ๐ก๏ธ | 80 | 18 | 3 | Backstab (guaranteed crit) |
| Mage | ๐ฎ | 70 | 8 | 3 | +2 starting skill points |
| Tank | ๐ก๏ธ | 150 | 8 | 12 | HP regeneration |
| Ranger | ๐น | 100 | 12 | 6 | +100% gold drops |
| Paladin | โจ | 110 | 13 | 8 | Lifesteal 15% |
| Berserker | ๐ฅ | 60 | 25 | 2 | Blood Frenzy (low HP = high damage) |
| Necromancer | ๐ | 75 | 10 | 4 | Life drain attacks |
- Poison โ - 5 DMG/turn, 3 turns
- Burn ๐ฅ - 8 DMG/turn, 3 turns
- Freeze โ - 50% skip turn, 2 turns
- Bleed ๐ - 3 DMG/turn, 4 turns
- Stun โก - Cannot act, 1 turn
- Regeneration ๐ - +5 HP/turn, 5 turns
- Strength ๐ช - +10 ATK, 3 turns
- Protection ๐ก - +5 DEF, 3 turns
Rarity System:
- Common (70%) - Base stats
- Uncommon (20%) - 1.3x stats
- Rare (8%) - 1.6x stats
- Legendary (2%) - 2.0x stats
Procedural Names:
- 21 weapon prefixes (Flaming, Freezing, Vampiric, etc.)
- 16 armor prefixes (Sturdy, Enchanted, Spiked, etc.)
- 16 suffixes per type (of Power, of the Warrior, etc.)
- Example: "Flaming Dragon Sword of the Titan" (+22 DMG, burn proc)
| Room | Icon | Effect |
|---|---|---|
| Shop | ๐ | Buy equipment & potions |
| Shrine | โช | Random blessing (HP/ATK/skills) |
| Treasure | ๐ | Guaranteed rare+ loot |
| Challenge | โ๏ธ | Wave fight โ legendary reward |
| Fountain | โฒ | Full heal + cleanse status |
| Altar | ๐ฎ | Trade HP for power |
| Library | ๐ | +2 skill points |
Spike ^, Arrow โ, Poison Gas โ, Fire ๐ฅ, Ice โ, Net ๐ธ, Teleport ๐, Alarm ๐
- Search (f) to detect
- 50% disarm chance
- Density increases with level
Earn souls from achievements, spend on permanent upgrades:
Stats (Stackable, max 10):
- +10 Max HP (50 souls)
- +2 Attack (75 souls)
- +1 Defense (60 souls)
Passive Abilities:
- Life Steal 10% (400 souls)
- Critical Strikes 10% (350 souls)
- Thorns 10 DMG (250 souls)
- Evasion 10% (300 souls)
- Gold Magnet +50% (500 souls)
Ultimate:
- Second Chance (revive once) - 1000 souls
- Berserker Mode (+50% DMG) - 800 souls
- Legendary Start - 1500 souls
Complete challenges for soul rewards:
- First Blood (1 kill) - 10 souls
- Slayer (50 kills) - 50 souls
- Boss Hunter (5 bosses) - 100 souls
- First Victory - 500 souls
- Glass Cannon (win <20 HP) - 400 souls
- Speedrunner (win <100 turns) - 300 souls
- Completionist (all achievements) - 1000 souls
Earned through gameplay:
- Warrior Start (50 kills) - +20 HP, +5 ATK
- Treasure Hunter (100 kills) - +50% gold
- Survivor (30 kills) - Start with 2 potions
- Weapon Master (75 kills) - Better starting weapon
- Armor Expert (75 kills) - Better starting armor
- Dungeon Mapper (150 kills) - Increased FOV
- Boss Slayer (10 bosses) - +20% boss damage
Themes change every 2 levels, each with unique enemies and bosses:
| Theme | Enemies | Boss |
|---|---|---|
| Dark Dungeon | Goblin, Orc, Troll | Dragon |
| Ancient Crypt | Skeleton, Ghost, Wraith | Lich |
| Volcanic Depths | Fire Imp, Magma Beast, Ifrit | Fire Lord |
| Frozen Caverns | Ice Sprite, Frost Giant, Wendigo | Yeti King |
| Twisted Grove | Boar, Treant, Dryad | Elder Treant |
| Cursed Temple | Cultist, Gargoyle, Demon | Archfiend |
- BSP Algorithm for organic layouts
- FOV System with raycasting (7-tile radius)
- Boss Levels every 3 levels
- Dynamic Difficulty scaling
Real-time Input: With keypress package installed, enjoy instant response - no Enter key needed!
Movement: w/a/s/d | Multi-step: 5w, 10d | Auto-explore: o
Actions: e interact | f search traps | 1-5 abilities
Menus: i inventory | m minimap | k abilities | ? help | q quit
Note: Without keypress, game falls back to readline mode (press Enter after each command)
- Top 100 all-time scores
- Score = Levelร1000 + Killsร10 + Gold + Speed Bonus
- Tracks: Level, Kills, Gold, Turns, Win/Loss
- Per-day ranking with same seed
- Challenge modifier displayed
- Fair competition
Architecture: 22 modules, 6000+ lines, 200+ functions Algorithms: BSP dungeon gen, raycasting FOV, BFS pathfinding Dependencies: Zero! Runs on pure base R Optional packages:
keypress- Real-time input (NEW!)cli- Enhanced terminal UIcrayon- Rich color supportjsonlite- Human-readable save files Performance: <50ms per frame
src/
โโโ game_state.R # Core state management
โโโ dungeon_gen.R # BSP generation
โโโ combat.R # Combat & AI
โโโ fov.R # Raycasting FOV
โโโ character_classes.R # 8 classes
โโโ daily_challenges.R # Daily mode
โโโ souls_shop.R # Meta-currency shop
โโโ achievements.R # Achievement system
โโโ leaderboard.R # High scores
โโโ items_extended.R # Procedural items
โโโ status_effects.R # Status system
โโโ special_rooms.R # Special rooms
โโโ traps.R # Trap system
โโโ ... (9 more modules)
Early Game: Unlock Treasure Hunter first (+50% gold), use auto-explore (o), search for traps (f) Mid Game: Save abilities for bosses, visit all special rooms, prioritize legendary items Late Game: Stack meta-progression + soul shop upgrades, experiment with classes Meta: Complete achievements for souls, combine class + unlocks + shop for max power
- Real-time input with
keypresspackage โจ NEW! - Animated transitions
- Additional character classes
- Multiplayer co-op mode
- ASCII sound effects
- CRAN package submission
- WebAssembly port for web play
- Mod support (custom themes/items)
MIT License - Copyright (c) 2025 Fabian Distler
- ๐ 6000+ lines of code
- ๐ฎ 50+ gameplay features
- โ๏ธ 8 character classes
- ๐ฏ 10 daily challenge modifiers
- ๐ 20+ soul shop upgrades
- ๐ 25+ achievements
- ๐จ 6 dungeon themes
- ๐ฅ 8 status effects
- ๐ 7 special room types
- ๐ฒ Infinite replayability
Proof that R is not just for data science! ๐โก๏ธ๐ฎ
Ready to descend?
# Quick start:
make play
# Or:
./start.shEvery death makes you stronger. Good luck, adventurer! ๐๐ฎ