While You Create.com

Prompt Published July 26, 2026 ·2 min read

Code your first game: a text adventure

Your story, your rules, your code. Design the adventure on paper and use AI as a teacher who explains, not a machine that builds it for you.

Every game you have ever played was programmed by someone. Today you switch sides. A text adventure is the perfect first project: just words, decisions and a bit of logic, no graphics, no complicated engines. At the end you will have a game that exists in no store, because it is yours.

Before touching the keyboard: paper and pen. Draw the map: three to five scenes, which decision happens where, one good ending and at least one disastrous but funny one. This part is not delegated: the story is yours, and the AI works far better when you show up with a plan.

The prompt

Copy this prompt
I want to code my first text adventure in Python and I have already designed the story on paper: [SUMMARISE YOUR SCENES AND ENDINGS]. My coding level is: [ZERO / I HAVE TRIED A BIT]. Guide me step by step: explain each concept (variables, input, conditionals, loops) exactly when I need it, with short snippets that I will type by hand. Never give me the finished game: after every step, tell me what to test and ask me one question so I figure out the next part myself.

The golden rule: you type, no copy and paste. Writing every line is how you understand what it does, and that is the difference between coding and watching. Test the game after every step, even when it only does one thing: seeing your first scene on screen already counts as a win.

When something breaks (and it will)

Errors are not the enemy, they are the game within the game. Make a deal with yourself: first you read the error message and make a guess. Then you try a fix. Only after ten minutes of being stuck do you paste the error into the chat and ask for a hint, not the solution. Every error you crack on your own is worth three tutorials.

One step further

  • Add an inventory: items you pick up in one scene that open doors in another.
  • Hand the game to a friend and note where they get stuck and where they laugh: that is real playtesting.
  • Version 2: health points, an enemy that decides with random numbers, or a secret ending.

FAQ

Do I need to install anything to start?

Not at first: there are free Python environments that run in the browser. Ask the AI to recommend one and explain how to run your first file.

What if I know absolutely nothing about coding?

Even better, say exactly that in the prompt. A text adventure starts with three concepts: showing text, reading an answer, deciding with if-then. You can learn all three in one afternoon.

From the book For teenagers (13 to 18) →