DEV Community

TANYA LYOP ACHAYI
TANYA LYOP ACHAYI

Posted on

Day 14 of 100.


✨ Day 14 of 100 ✨

Today I built a mini story app using functions. 📖
I realized how functions make my code cleaner and more organized. Instead of writing everything in one place, I can break my program into small pieces that work together.

It feels like directing a movie 🎬.
Each function plays its role in the story.

One step, one line, one story at a time.

PythonZeroToHeroStudent

100DaysOfPython

MiniStoryApp

Top comments (2)

Collapse
 
daemonic01 profile image
Dominik Kopócs • Edited

Oh, nice little foundation for an RPG game. Great!
That's how programming turns to stories, right?

I wrote a comment yesterday about something like this that I'd like to share. The author of the post asked for Python learning project ideas and I used an RPG game as an example:

For example if you start with a text-based RPG game, start with an easy, lightweight version of it. Then expand its features. As you progress with the smallest changes, you will come up with ideas to expand the system:

  • Let's start with some input requests and decision making with if-elif-else branches. It's not a big deal, right?
  • Oh, maybe I should add HP to the player (if the player goes to a wrong direction, reduce HP)
  • Oh, what if I add Mana for the players and a skill that they can use? (every move add some mana and HP back)
  • Can I add another stat or skill?
  • Hey, there's only one character to choose. Maybe I should add more...
  • What if I add some dialogs and conversations?
  • Could I do/add/solve this more efficiently? Maybe an OOP object for the characters or universal decision classes?

It works for all type of project. Try it out. :)

The point is that you start with a little script and you can expand. As it grows and becomes more complex, you learn along the way. What you build builds you.

Collapse
 
lyop_achayi profile image
TANYA LYOP ACHAYI

This is a good read, I love it..

I will try it, and thanks for following my journey 🥰🥰🤗🤗🤗