Hero's Journey a text-based RPG Game

Hero’s Journey V1.0

Hello everybody!

This is what I decided to do for the CS101 portfolio project of making a python terminal game.

This is the first working version of the python text-based RPG game that I have called Hero's Journey.

In this game, you will find yourself in the shoes of the hero who must defeat the Demon King to bring peace back to his world.

To do this, you must train and level up to improve your stats, you will do this by fighting against different enemies (minions of the Demon King), gaining experience, potions, and money once you defeat them, money, that you will be able to then use on the store to buy more potions to help you on your adventure.

Be careful with how much you risk while training or when fighting the bosses since if you are left with no more health points, you will lose all your potions and part of your money.

The game is divided into six sections.

Game Start

At the beginning of the game, the game will ask you for your name, and you will receive ten stat points to distribute as you wish on four different attributes:

  • Attack: Determines how much damage the player deals
  • Defense: Determines how much damage the player ignores.
  • Speed: Determines the chance of the player avoiding an enemy attack.
  • Crit Chance: Determines the chance of the player hitting a critical strike when attacking.

Once you have done this, the game will take you to The Village

The Village

This is basically the game’s menu, where you can choose what to do next.

You will recover your HP every time you come back to the Village and also be transported back here when an enemy defeats you.

Game's Menu
Game's Menu

Training Grounds

Here is where you will face the minions of the Demon King, accumulating experience, potions, and money.

You will face each of them in turn-based combat, where the player will choose between using a potion to recover some health or attacking the enemy in front.

Once you decide to attack, it will be the enemy’s turn to attack you.

Using potions in combat will not make the player lose his turn.

Battle Against Minion Battle Example

Once you defeat the enemy, you will be given the option to continue training which will set up another combat, or go back to the village to recover your HP.


Here you will be able to spend the money you have won by killing enemies on potions.

Potions are handy if you want to stay training for a while or if you are going to face one of the game’s bosses.

Each potion will recover 20% of your maximum health, and you can carry a maximum amount of 10 potions at a time.


Check Stats

As you level up through the game you will accumulate stat points to improve your attributes. Here is where you can spend all those stat points on the 4 different attributes mentioned at the Game Start section as well as checking what your current stats are:

Checking the player Stats
Player Stats

The player can choose how he wants to spend his stat points; however, every attribute will reach its maximum level once it reaches level 10.

Spending Stat Points
Spending Stat Points

Stat Points Used
Stat Points Used

Battle Boss

The game has four bosses.

The three generals of the army:

  • Abadon
  • Mammon
  • Belphegor

And the Demon King himself: Lucifer

The combat mechanics against the bosses are the same as with the minions; however, bosses are much more robust. If the player has not trained enough, it might be virtually impossible to defeat them until the player reaches a certain level.

Fighting Without Training

Installing the game

You can find the code for the game at this repository at GitHub.

You can also download the executable on this link

Closing notes

Feel free to contact me through my email (public on my Github profile) if you find any issue or problem with the game or if you have any advice about how something might be better implemented. You can also try adding more stuff to the game I would love to see that.



Is there a version of this that is Mac compatible?


Unfortunately, I don’t have a Mac device to test the code on so I don’t really know how it looks there however I tested the game on Ubuntu and it works fine the only thing being different is that since I am using the cls command to clean the screen and that is a Windows command the screen never cleans itself up on Ubuntu. However, this can be changed on the code by changing cls for clear on line 11.

So I think that if you clone the code from my repository into your Mac device and then execute it from the terminal it should work.

Let me know if that works! :grin:

Okay cool. I have an Acer laptop as well and downloaded the game onto it. I have completed the game. Thanks for sharing it. I had fun playing it and will get my wife to play it as well. The cls works perfectly on my Acer just so you know.

1 Like


I’m happy you liked it, thanks :smile:

1 Like