Backstory

When I was a teenager, I enjoyed making my own custom maps, mostly tower defences, in the Warcraft III map editor. I even managed to finish a map I called “Small TD” and played it online with random people. This was a milestone for me. I found out I could build small things and people can enjoy them.

Almost 20 years later (😂) - I am still driven by the same incentive to make games. Since I am learning Python actively, and I have finished some nice projects, finished Part I of the “Automate the Boring Stuff with Python” - I thought - can I make a game? Well, of course, my Python knowledge is limited and I understand Python is not the first choice for writing game code, but still - why not? It will be a nice project, I will learn a ton, and make something I value.

RPG

I will try to make a simple game that will be finished in 5-6 days. These are my thoughts on the elements of the game:

  • text-based terminal RPG
  • game starts by asking for the player’s name
  • user plays the game by making simple choices and advances through the rooms (4 or 5 rooms)
    • room 1: A starting room with one enemy. The enemy is unbeatable; the player has to run to clear the room.
    • room 2: Actually a basement. The player has to find a key to move forward.
    • room 3: A powerup. Player gets + 10000 damage and + 100000 health. Prepare for boss fight.
    • room 4: Player can hit the boss and win. Gets some generic “you win” message. The second option is to run — which triggers a secret room that is actually a prison of the player’s own mind. The third and final option is to talk with the enemy, after which they become friends and share adventures in the future.
    • secret room - A mind game where the player is trapped in a while loop with no way to actually finish or quit the game.

Conclusion

This project will serve several purposes. First of all, it will be hard for me to do — I will need to learn a lot of new things in Python. Secondly, I will have the opportunity to make something real and share it with friends. And finally, there is a kind of philosophy behind the boss fight — my take on life and decisions.

slow_print function excerpt I’m proud of 🤓:

def slow_print(text, delay):
	for char in text:
		sys.stdout.write(char)
		sys.stdout.flush()
		time.sleep(delay)
	print()