BBC Micro – Creating a Text-Based Adventure Story Game

This tutorial is the fourth of a set of lessons/tutorials that focus on:

BBC Micro Online Emulator

To complete these lessons, you do not need access to a physical BBC micro computer. You can use the following online emulator and type commands in your browser, without the need to install anything on your computer.

You may also find the following BBC Basic emulator quite handy for testing your own BBC Basic programs.

️ Upside-Down World — BBC BASIC Text Adventure Tutorial

You are about to create a game called “Upside-Down World”, a text-based adventure game inspired by the series Stranger Things. This game will let the player make choices that affect the story.

Story Setup

Here is the background context for this game:

  • You play as Eleven.
  • You discover a mysterious Gate to the Upside-Down world.
  • Your mission: find Will Byers, a friend of yours who is trapped in the Upside-Down.
  • At each point, the player must choose what to do next.
Step 1 — Planning the Game Structure
Step 1 — Planning the Game Structure

Our code will mainly be based on using the following BBC Basic commands:

  • PRINT → to show story text
  • INPUT → to get player choices
  • IF … THEN → to react to choices
  • GOTO → to move between story sections (using line numbers)

Each part of the story will have its own section in our program, for example:

  • From line 10 to 990: The title screen and introduction to the story line
  • From line 1000 The discovery of a gate to the Upside-Down
  • From line 1500 What happens if the player decides to run away from the gate
  • From line 2000 What happens if the player decides to go through the gate
  • etc.
Step 2 — Adding a Title Screen
Step 2 — Title Screen
10 MODE 7
20 PRINT "=============================="
30 PRINT "     UPSIDE-DOWN WORLD"
40 PRINT "=============================="
50 PRINT
60 PRINT "A Stranger Things Inspired Adventure"
70 PRINT
80 PRINT "Press ENTER to begin"
90 INPUT A$
100 GOTO 1000

This creates a simple intro screen.
You can test your game so far by using the RUN command:

RUN
Step 3 — Starting the Story
Step 3 — Starting the Story
1000 CLS
1010 PRINT "You are Eleven."
1020 PRINT "It is late at night in Hawkins."
1030 PRINT "Suddenly, you feel something strange..."
1040 PRINT
1050 PRINT "In the woods, you see a glowing GATE."
1060 PRINT
1070 PRINT "Do you:"
1080 PRINT "1 - Go through the Gate"
1090 PRINT "2 - Run back to town"
1100 PRINT
1110 INPUT "Enter 1 or 2: " choice

1120 IF choice = 1 THEN GOTO 2000
1130 IF choice = 2 THEN GOTO 1500
1140 GOTO 1110

The GOTO instruction on line 1140 means that if the player types something else (not option 1 or 2), the game asks the same question again.


Step 4 — Running Back to Town Path
Step 4 — Running Back to Town Path
1500 CLS
1510 PRINT "You run back towards Hawkins."
1520 PRINT "You tell Mike and Dustin about the Gate."
1530 PRINT
1540 PRINT "They decide you must go back and rescue Will!"
1550 PRINT
1560 PRINT "You return to the woods together..."
1570 PRINT
1580 PRINT "Press ENTER to continue"
1590 INPUT A$
1600 GOTO 2000

This brings the story back to the main mission.

Step 5 — Entering the Upside-Down
Step 5 — Entering the Upside-Down
2000 CLS
2010 PRINT "You step through the Gate..."
2020 PRINT
2030 PRINT "The world is dark and cold."
2040 PRINT "Strange sounds echo around you."
2050 PRINT
2060 PRINT "You must find Will before it's too late."
2070 PRINT
2080 PRINT "You see:"
2090 PRINT "1 - An old abandoned school"
2100 PRINT "2 - A dark tunnel leading underground"
2110 PRINT
2120 INPUT "Where do you go? (1 or 2): " choice

2130 IF choice = 1 THEN GOTO 3000
2140 IF choice = 2 THEN GOTO 4000
2150 GOTO 2120

Now the player can choose different paths.

Step 6 — One Example Location
Step 6 — One Example Location
3000 CLS
3010 PRINT "You enter the ruined school."
3020 PRINT "Desks are overturned."
3030 PRINT
3040 PRINT "You hear a noise upstairs..."
3050 PRINT
3060 PRINT "Do you:"
3070 PRINT "1 - Go upstairs"
3080 PRINT "2 - Hide and listen"
3090 PRINT
3100 INPUT "Choose 1 or 2: " choice

3110 IF choice = 1 THEN GOTO 5000
3120 IF choice = 2 THEN GOTO 6000
3130 GOTO 3100

From here, you will have to be creative with your story line. You can add monsters, clues, or even rescue scenes.

Step 7 — Suggested Storyline Ideas
Step 7 — Suggested Storyline Ideas

Here are a few ideas of some of the new scenes you can add to your story lines.

  • You collect some items in a room of the school (e.g. torch, radio, weapon)
  • You are face to face with a Demogordon (monster) in the school library, will you fight it or run away?
  • You find Will hiding in the school sports hall

Here are some possible endings for your game:

  • You rescue will successfully, and run back to the gate to escape from the Upside-Down
  • You rescue will successfully, and run back to the gate to escape from the Upside-Down but a Demogordon follows you through the gate…
  • The gate you used to access the Upside-Down is now closed so you too end up getting trapped in the Upside-Down
  • You cannot find Will anywhere and decided to escape through the gate. This would mean that you have failed the mission
Step 8 — Extra Challenges Ideas
Step 8 — Extra Challenges Ideas

There are so many ways you could make you game even more complex and engaging to play

Here are some suggestions of what you could add to the game:

⭐ Beginner Level:

  • Add another location in the Upside-Dow
  • Add more dialogue for each scene

⭐⭐ Intermediate Level:

  • Add a health score
  • Lose health when meeting a monster

⭐⭐⭐ Expert Level:

  • Add an inventory system
  • Give more options on different scenes based on the items the player has collected.
    For instance they can only go through the underground tunnel if they have previously collected a torch.

Example health system idea:
Towards the start of you code, initialise the players health to 100.

LET health = 100

When the players fight a Demagordon they lose some of their health score.

health = health - 20
PRINT "Health Score: "; health
IF health <= 0 THEN GOTO 9000
Step 6 — One Example Location
Game Over Example
9000 CLS
9010 PRINT "You collapse from your injuries..."
9020 PRINT
9030 PRINT "The Upside-Down has claimed another victim."
9040 PRINT
9050 PRINT "GAME OVER"

Did you like this challenge?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 4

No votes so far! Be the first to rate this post.

As you found this challenge interesting...

Follow us on social media!