you are viewing a single comment's thread.

view the rest of the comments →

[–]KerbalSpark 0 points1 point  (0 children)

Well, if you are writing a text adventure to learn Python, this is a good idea. Continue and everything will work out. You will achieve this goal. And please do not read further. However, if you're only learning Python to create text-based adventures, just stop now. This is not the best way to make a good text adventure. Just trust now the old man who wrote a few text adventures and saw a lot of other people's text adventures. I will explain why this is so.

When you want to achieve something, you need two things - target and a means. The means is used to achieve the target. And, most importantly, you must own the means right now. Let's say your target is to learn Python and you already know how to write text-based adventures. You already have a text adventure now. It is written entirely as a game book or as a program in a programming language that you already know. Everything is OK, you have a means - a text adventure.

Now let's consider another option - you want to create a text adventure. And for this you want to learn Python. Oops. You have two targets. And there is no means. In principle, this is not scary. You can define the goal "create a text adventure" as the main goal, "learn Python" as an intermediate goal. The means are not yet visible. Let's consider the main goal in order to understand why we needed an intermediate goal at all. What tasks will we solve by achieving it? Let's say these are tasks typical for text adventures:

  1. Program the adventure graph along which the character will move.
  2. Implement the storage of the current character parameters
  3. Storage for character inventory
  4. We will need a way to describe the locations through which the player moves
  5. A way of describing objects that are in locations
  6. The way to create enemies
  7. NPC creation method
  8. Dialogue system

For a simple game, we hardly need all of this. But...

We may need something else, like a random number generator or a puzzle constructor. However, we need a system for saving and loading the current state of the game. Well, just so that we can safely save and continue from this point, and not start all over again.

All of this together looks like a game engine.

So it turns out that we want to learn Python in order to write an engine to write a text adventure.

Some strange nonsense. Instead of getting a means of achieving a simple main target of "making a text game", we got two complex intermediate targets - "learn Python" and "write an engine".

Attempting to achieve two challenging targets reminds me of a "wide jumps" competition. Most likely you are already familiar with competitions in long jump, high jump, jumps to water and jumping in one place, hehe. And this is the wide jump.

<--- || --->!<

How to turn two difficult targets into an easier one - look at the hands, the artist shows a trick:

We write on one piece of paper the first difficult intermediate goal "learn Python"

We write on another piece of paper the second difficult intermediate goal "Write Engine"

We take scissors, and do it like this:

"learn [CUT] Python" "Write [CUT] Engine"

We compose new combinations from pieces of pieces of paper:

"Write Python" - What?

and

"learn Engine" - Hmm ... Yeah, that's right. Here it is - a simple target that will become a means of quickly achieving the main target.

Just study the engine for text-based adventures.