A console-based RPG developed in C++ with a focus on clean architecture,
object-oriented design, and core game systems.
This project was built to practice real-world C++ development concepts such as
inheritance, file I/O, debugging, and system design.
- Turn-based combat system
- Player and enemy entities
- Inventory and item usage
- Save and load game state using file serialization
- Clean OOP design with a shared
Characterbase class - Modular code structure with header/source separation
text-rpg-cpp/ │ ├── main.cpp ├── Game.h / Game.cpp ├── Character.h / Character.cpp ├── Player.h / Player.cpp ├── Enemy.h / Enemy.cpp ├── Item.h / Item.cpp ├── .gitignore └── README.md
- C++17 compatible compiler (tested with g++ / MinGW)
- Windows (other platforms may require small adjustments)
``bash g++ main.cpp Game.cpp Player.cpp Enemy.cpp Item.cpp Character.cpp -o TextRPG
Run TextRPG
💾Save System
The game supports saving and loading progress:
Player HP
Inventory items
Data is stored in a simple text file (save.txt) for clarity and learning purposes.
🧠 What I Learned
C++ object-oriented programming and inheritance
Header/source file organization
Game loop architecture
File I/O and basic serialization
Debugging compiler and linker errors
Refactoring code safely without breaking functionality
Using Git and GitHub for version control
🚀 Possible Improvements
Experience and leveling system
Multiple enemies and encounters
Better input validation and menus
Data-driven configuration (JSON / external files)
Graphical version using SFML or SDL
Lucas
Game Development student (Brazil)
Focused on C++, game systems, and gameplay architecture