
RPG Beta is a horror-themed, text-based RPG I built as my final project for ECE 205 (University of Hawaiʻi, College of Engineering).
The game combines a branching narrative (loaded from a JSON story file) with turn-based battles against undead enemies, implemented with an object-oriented character system (Knight/Wizard vs. Zombie/Zombie King).
story.jsonperformAction()
"throne_room": {
"setting": "You slip into the throne room... On the throne sits your fallen king...",
"triggerBattle": 1,
"victory": "good_ending",
"defeat": "bad_ending"
}
void runBattle(PlayerCharacter* a, PlayerCharacter* b) {
while (a->getHealth() > 0 && b->getHealth() > 0) {
a->performAction(b);
if (b->getHealth() <= 0) break;
b->performAction(a);
}
}