A console-based dungeon-crawler RPG written in Java. You play a forgotten hero in the land of Eldoria, tasked by the king with infiltrating the Lord's Guild and defeating The Evil Lord to bring peace back to the realm.
Built as the second OOP project for the Computer Science programme at the University of Groningen (Year 1, Block 4).
The game runs in your terminal. You move between rooms, talk to NPCs, fight enemies, collect items, and complete quests until you face The Evil Lord. Every action is driven by numeric menu input.
Pick one of three classes at the start of the game — each has different base stats and play style:
| Class | Description |
|---|---|
| Knight | High health, balanced offense and defense |
| Assassin | High damage, excellent dodge chance |
| Tank | Very high health, strong defensive bonuses |
Three difficulty levels (Easy / Medium / Hard) scale enemy stats via a global multiplier. Difficulty can be changed at any time from the main menu.
- Rooms connected by Doors, including locked variants (
GuardianDoor,EvilDoor) that require specific conditions to open. - NPCs: Healers restore your HP, Rangers and Fallen Knights offer quests or trade, and Statues (Red / White) give buffs or curses.
- Enemies: Skeletons, Wolves, Lava beasts, and the final boss — the Lord.
- Chests spawn after you clear all enemies in a room and contain weapons.
- Items: Weapons, Shields, and Elixirs, all managed via an inventory UI.
- Quests: Collect quests and Defeat quests track your progress toward the final goal.
- Quicksave / Quickload (single slot, instant).
- Named saves persisted to the
savedgames/directory via Java serialization.
- Java 17+
- Maven 3.6+
mvn clean compile
mvn exec:java -Dexec.mainClass="nl.rug.oop.rpg.Main"Or, after packaging:
mvn package
java -cp target/rpg-1.0-SNAPSHOT.jar nl.rug.oop.rpg.Mainsrc/main/java/nl/rug/oop/rpg/
├── Main.java Entry point
├── Game.java Main game loop and input handling
├── Core/ Player, Room, Battle, Inventory, save/load
│ └── PlayerClasses/ Knight, Assassin, Tank
├── NPC/ NPC hierarchy
│ ├── Enemy/ Wolf, Lava, Lord, generic enemies
│ └── Statue/ Red and White statues
├── Door/ Door, GuardianDoor, EvilDoor
├── Item/ Weapon, Shield, Elixir
├── Quest/ DefeatQuest, CollectQuest
└── Interface/ Interactable, Inspectable, Attackable
The design relies heavily on inheritance and polymorphism, with shared behavior
captured in the Interactable, Inspectable, and Attackable interfaces.
- Harry C. Kepler
- arthantyo
- A. Koukoumeli