Skip to content

fabiandistler/Rogue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

34 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ ROGUE - The Ultimate R Dungeon Crawler

A feature-complete, terminal-native roguelike game written entirely in R!

License: MIT R


๐ŸŒŸ Overview

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

๐Ÿš€ Quick Start

# 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")

๐ŸŽฎ Game Modes

๐Ÿ—ก๏ธ Normal Run

  • Choose from 8 character classes
  • Earn souls through achievements
  • Unlock permanent meta-progression bonuses
  • Compete on global leaderboard

๐ŸŽฏ Daily Challenge

  • 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

โš”๏ธ Character Classes

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

๐Ÿ”ฅ Core Systems

Status Effects (8 Types)

  • 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

Item Rarities & Procedural Generation

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)

Special Rooms (7 Types)

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

Traps (8 Types)

Spike ^, Arrow โ†’, Poison Gas โ˜, Fire ๐Ÿ”ฅ, Ice โ„, Net ๐Ÿ•ธ, Teleport ๐ŸŒ€, Alarm ๐Ÿ””

  • Search (f) to detect
  • 50% disarm chance
  • Density increases with level

๐Ÿ† Meta-Progression

๐Ÿ’Ž Souls Shop (20+ Upgrades)

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

๐ŸŽฏ Achievements (25+)

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

๐Ÿ“ˆ Classic Meta-Progression (7 Unlocks)

Earned through gameplay:

  1. Warrior Start (50 kills) - +20 HP, +5 ATK
  2. Treasure Hunter (100 kills) - +50% gold
  3. Survivor (30 kills) - Start with 2 potions
  4. Weapon Master (75 kills) - Better starting weapon
  5. Armor Expert (75 kills) - Better starting armor
  6. Dungeon Mapper (150 kills) - Increased FOV
  7. Boss Slayer (10 bosses) - +20% boss damage

๐ŸŽฒ Dungeon Features

Themes (6 Types)

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

Generation

  • BSP Algorithm for organic layouts
  • FOV System with raycasting (7-tile radius)
  • Boss Levels every 3 levels
  • Dynamic Difficulty scaling

๐Ÿ•น๏ธ Controls

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)


๐Ÿ… Leaderboards

Global Leaderboard

  • Top 100 all-time scores
  • Score = Levelร—1000 + Killsร—10 + Gold + Speed Bonus
  • Tracks: Level, Kills, Gold, Turns, Win/Loss

Daily Leaderboard

  • Per-day ranking with same seed
  • Challenge modifier displayed
  • Fair competition

๐Ÿ› ๏ธ Technical Details

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 UI
  • crayon - Rich color support
  • jsonlite - 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)

๐Ÿ’ก Pro Tips

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


๐Ÿš€ Future Enhancements

  • Real-time input with keypress package โœจ 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)

๐Ÿ“„ License

MIT License - Copyright (c) 2025 Fabian Distler


๐ŸŽ‰ Stats

  • ๐Ÿ“ 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.sh

Every death makes you stronger. Good luck, adventurer! ๐Ÿ’€๐ŸŽฎ

About

Rogue-Lite Game in R

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages