Skip to content

This is our simple project for fundamental of programming with C++. This is a group based project where each group must create and demo their own project.

Notifications You must be signed in to change notification settings

arezyhs/cplusplus-final-project-rpg-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Adventure RPG Game

Overview

This project is a simple text-based RPG game written in C++. Players navigate through a fantasy world, encountering enemies and making choices to progress in the game.

Contributors

Features

  • Player Class: The game includes a Player class with attributes such as name, level, experience, health, attack, coins, and defense.
  • Enemy Classes: Various enemy classes, such as GoblinEnemy, WizardEnemy, DarkKnightEnemy, GiantEnemy, and FinalBossEnemy, each with unique characteristics.
  • Combat System: Players engage in turn-based combat with enemies, choosing to attack or run away. Combat outcomes impact player stats and progression.
  • Exploration: Players can explore the game world, encountering random events like finding coins or facing enemies. Level 10 introduces a final boss encounter.
  • Healing: Players can choose to heal by spending coins, replenishing health during their journey.
  • Save and Load: The game supports saving and loading player progress using a text file (player_progress.txt).
  • Class Selection: Players can choose their character class at the beginning, affecting starting stats.

How to Play

  1. Enter your character's name.
  2. Choose a character class: Warrior, Archer, or Knight.
  3. Embark on an adventure, exploring the world, battling enemies, and leveling up.
  4. Use the options to explore, heal, save, load, or exit the game.

Character Classes

  • Warrior:
    • Health: 100
    • Attack: 20
    • Defense: 5
  • Archer:
    • Health: 75
    • Attack: 20
    • Defense: 20
  • Knight:
    • Health: 150
    • Attack: 25
    • Defense: 10

Cheat Code (for testing)

Press 9 when choosing a character class to activate cheat mode, setting your character to level 10 with enhanced stats.

Dependencies

  • C++ Standard Library

How to Compile and Run

  1. Make sure you have a C++ compiler installed.
  2. Compile the source code.
                    g++ -o adventure_rpg adventure_rpg.cpp
                
  3. Run the executable.
                    ./adventure_rpg
                

Acknowledgments

Thank you for playing the Adventure RPG game! Have fun exploring the fantasy world and overcoming challenges!

About

This is our simple project for fundamental of programming with C++. This is a group based project where each group must create and demo their own project.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages