Built in Python with character progression, turn-based combat, map exploration, camping activities, and a menu-driven interface.
Technologies Used:
🐍 Python 3.12+ |
🎨 Rich (terminal UI) |
🌐 requests 2.32 |
📄 JSON |
📦 Managed with uv
-
Character System (
src/charactersys.py)- Character class with comprehensive stats (life, mana, xp, atk, defense, lvl, agi, int, str, dex, luck)
- Three distinct character classes: Fighter, Mage, and Rogue
- Leveling system with XP requirements and stat progression on level up
- Combat mechanics with damage calculation and status effects
-
Menu System (
src/menu.py)- ASCII art main menu with emoji decorations
- New Game setup with class selection and custom name
- Load Game functionality with save file validation
- About section with game information and controls
- GitHub repository integration
help//helpcommand listing all in-game commands
-
Enemy System (
src/enemys.py)- 8 enemy types: Goblin, Orc, Skeleton, Slime, Bandit, Dark Mage, Ogre, Dragon Whelp
- Dynamic enemy selection based on player level
- Enemies use their own skills during combat
- Enemy phrases and loot drops
-
Combat System (
src/combat.py)- Turn-based combat with skill-based attacks and a free basic attack
- Skill cooldowns, mana costs, targets and status effects (freeze, buffs)
- XP gain and loot from defeating enemies
- Flee mechanic based on agility with a random component
-
Map System (
src/map.py)- Procedurally generated 10x10 map with varied terrain
- Infinite world exploration (new maps generate at the borders)
- Player position tracking and WASD movement controls
- Terrain-based encounter rates (forests and mountains are more dangerous)
- Visual map display with player marker
-
Camping System (
src/camping.py)- Train a class attribute (Intelligence/Agility/Strength)
- Fish for consumable items
- Sleep to restore life and mana
-
Skills System (
src/skillsys.py)- Comprehensive skill database with multiple categories
- Level-based skill unlocking system
- Physical, magical, and support skill types
-
Save/Load System (
src/save_load.py)- JSON-based save file system with absolute paths
- Complete game state preservation
- Save file validation (empty/corrupt saves are handled gracefully)
- Turn-based combat with strategic depth
- XP gain and leveling with stat improvements
- Random encounter system based on terrain
- Inventory management and equipment system
- Save/load functionality
- Multiple character classes with unique abilities
- Dynamic enemy scaling based on player level
- Camping activities to train and recover
- Python 3.12 or higher
- Clone the repository:
git clone https://github.com/danboy-lab/rpgtext.git
cd rpgtext- (Optional) Create a virtual environment:
python -m venv venv
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate- Installing the requirements
pip install -r requirements.txt
python src/main.py- W/A/S/D - Move around the map
- I - Open inventory
- O - Open status
- C - Camp (train, fish, sleep)
- SV - Save game
- L - Load game
- help or /help - Show this help
- Q - Quit game
- Start: Run
python src/main.pyto launch the game - Menu: Choose from New Game, Load Game, About, or GitHub
- Class Selection: Pick Fighter, Mage, or Rogue for different playstyles
- Exploration: Use WASD to move around the procedurally generated map
- Combat: Random encounters trigger turn-based battles (terrain affects rate)
- Progression: Defeat enemies to gain XP and level up (stats increase)
- Survival: Try to survive as many turns as possible!
- 🏆 Fighter: High strength and defense, balanced combat
- 🔮 Mage: Powerful magic attacks, high intelligence
- 🗡️ Rogue: High agility and dexterity, stealth-focused
rpgtext/
├── README.md
├── data
│ ├── enemy_phrases.json
│ ├── enemy_skills.json
│ ├── locations.json
│ └── skills.json
├── docs
│ ├── ROADMAP.MD
│ └── TODO.md
├── features
│ └── atribute_tree.py
├── pyproject.toml
├── requirements.txt
├── uv.lock
└── src
├── __init__.py
├── apis.py
├── camping.py
├── charactersys.py
├── combat.py
├── enemys.py
├── generate_maps.py
├── generate_player.py
├── inventory.py
├── lvlsys.py
├── main.py
├── map.py
├── map_storage.py
├── menu.py
├── npcs.py
├── save_load.py
├── showstats.py
└── skillsys.py
Run the game and test the main flows (new game, combat, camping, save/load, death and restart):
python src/main.py- Follow the modular structure
- Update documentation accordingly
- v0.1.0: Initial release with core systems integrated
- Combat with skills, cooldowns and basic attacks
- 8 enemy types with unique skills and loot
- Leveling, inventory, camping, save/load
- Terrain-based encounters and procedural world generation
We welcome contributions from the community! Whether you're fixing bugs, adding features, improving documentation, or helping with testing, your help is appreciated.
-
Planned tasks are listed in
docs/TODO.md, but don’t hesitate to explore and add your own ideas or improvements! -
Fork the repository on GitHub:
https://github.com/danboy-lab/rpgtext -
Clone your fork locally:
git clone https://github.com/danboy-lab/rpgtext.git
cd rpgtext- Create a new branch for your feature or bugfix:
git checkout -b feature/your-feature-name
# or for bug fixes:
git checkout -b fix/issue-description-
Make your changes and commit them with clear messages.
-
Push your branch to your fork:
git push origin feature/your-feature-name- Open a pull request on the original repository.
- Follow PEP 8 style guidelines.
- Write clear, concise commit messages.
- Add tests for new features or bug fixes.
- Update documentation as needed.
Thank you for helping improve RPG Text Adventure! 🎮
- Wish to make a cool isekai vibe in the future ;D
- Inspired by classic text-based RPG games