A role-playing game featuring character progression, turn-based combat, quests, and exploration with both graphical and text-based interfaces.
- Three Character Classes: Warrior, Mage, and Rogue, each with unique stats and special abilities
- Turn-Based Combat: Strategic battles against various enemies
- Character Progression: Level up system with stat increases
- Quest System: Complete quests for rewards and experience
- Exploration: Multiple locations to discover, each with different danger levels
- Inventory System: Collect items, weapons, armor, and potions
- Shop System: Buy and sell items at the village shop
- Save/Load System: Save your progress and continue later
- Python 3.6 or higher
- Pygame (for GUI version only)
- Clone or download this repository
- Navigate to the game directory
- For the GUI version, install pygame:
pip install pygame- Run the game:
GUI Version (Recommended):
python3 pygame_gui.pyText-Based Version:
python3 game.pyor make it executable:
chmod +x game.py
./game.pyWhen starting a new game, you'll create your character by:
- Choosing a name
- Selecting a class:
- Warrior: High HP and strength, specializes in physical attacks
- Mage: High MP and intelligence, powerful magic attacks
- Rogue: High agility, critical hits and evasion
GUI Version:
- Use your mouse to click buttons and navigate menus
- Click on inventory items to use or equip them
- Click on shop items to purchase them
- Combat uses interactive buttons for each action
Text-Based Version:
- The game is menu-driven. Simply enter the number corresponding to your choice.
- View Stats: Check your character's current stats, equipment, and progress
- Inventory: Manage your items, equip weapons and armor, use potions
- Explore: Search for random encounters and battles
- Travel: Move between different locations
- Visit Shop: Buy and sell items (available in Riverside Village)
- Quests: View, accept, and track quests
- Rest: Restore HP and MP to maximum
- Save Game: Save your progress
- Main Menu: Return to the main menu
Combat is turn-based. During your turn, you can:
- Attack: Basic physical attack
- Special Ability: Class-specific powerful attack (costs MP)
- Warrior: Power Strike (2x damage)
- Mage: Fireball (magic damage based on intelligence)
- Rogue: Backstab (critical hit)
- Use Item: Use a potion from your inventory
- Run: Attempt to escape from battle
- Riverside Village: Safe starting area with a shop
- Dark Forest: Moderately dangerous forest area
- Ancient Cave: Mysterious cave with treasures
- Abandoned Ruins: Dangerous ruins haunted by undead
- Misty Mountains: Treacherous mountain peaks
Accept and complete quests to earn gold, experience, and special items:
- The Goblin Menace: Defeat enemies to protect the village
- Cave Explorer: Discover the secrets of the Ancient Cave
- Mountain Climber: Reach the peak of the Misty Mountains
- Defeat enemies to gain experience and gold
- Level up to increase your stats
- Collect better weapons and armor
- Complete quests for rewards
- Explore dangerous areas for greater challenges
- Rest frequently to keep your HP and MP at maximum
- Buy potions before exploring dangerous areas
- Equip better weapons and armor as you find them
- Accept quests early to complete them as you explore
- Higher danger level areas have stronger enemies but better rewards
- Save your game regularly!
pygame_gui.py: Pygame GUI version (recommended)game.py: Text-based version and entry pointcharacter.py: Character, player, enemy, and item classescombat.py: Combat system and battle mechanicsworld.py: Game world, locations, shops, and questssave_system.py: Save and load game functionality
Save files are stored in the saves/ directory and are named after your character (e.g., hero_save.json).
Created as a classic text-based RPG adventure game.
Free to use and modify.
Enjoy your adventure!