Member-only story
Python RPG Game (Part 1)
How to create your own text-based RPG in Python using Object Oriented Programming!
I spent 15 days creating this RPG Game in Python, if you want to skip the tutorial and go straight to the code and read it, here’s the project in GitHub!
By the end of this series of articles, you’ll be able to create something like the GIF you see down below, where you’ll have a text-based RPG which I’ll be covering in a set of articles.

If you have any improvements on the code or any suggestions, please let me know. Have fun and enjoy the article!
In the following article I’ll be covering the:
- Hero Class (with its Getters and Setters)
- Enemy Class (with its Getters and Setters)
Step 1: Hero Class
Hero Class:
There are 7 different attributes for the Hero class, which would be the hero:
- Health = Hhealth
- Attack = Hattack
- Luck = Hluck
- Ranged = Hranged