Text Adventure Game

Your resources have saved my career

This text-based adventure game in Python is an eight part major programming project. It is intended to be used when students have completed our programming resources and is ideal to consolidate all the learning objectives into one large program.


Each stage of the project presents the students with working code to type in so they don't need to start from a daunting blank screen! This provides great scaffolding by ensuring even the very weakest students can attain success. The code listings are significant and illustrate all the programming constructs of sequence, selection, iteration, subroutines, lists and files.

Each stage also has learning points with questions that challenge the students to explain how the code works and justify why particular approaches have been taken. This relates back to the theoretical knowledge well.


  • num_modules is a constant. What does that mean, and what are the advantages of using constants?
  • The program has been written with a number of functions using the def command. Why?     
  • Explain how has input been validated.

Each stage has several challenges that enable the student to take the program further. Some are much harder than others, however, none of the stages are reliant on the student having completed any of the challenges for the program to continue to work at the next stage.


  • Comment the functions so each is explained.
  • The power variable should decrement by one after each move to add a time limit to the game. If the power variable equals 0 the player dies due to a lack of life support.
  • Improve the input sanitisation so the player does not need to enter MOVE. Lowercase and abbreviation to M should be accepted too.
  • Create your own space station configuration by modifying the text files.
  • Create a map of your station in a suitable application that a player can use to navigate in your game.
  • Add an extra line to the module files that contains a name for the module and outputs this to the screen. e.g. “You are in module 1. This is the communication module where astronauts contact Earth.”
  • Add a title screen that allows the player to choose play, story, instructions or quit.
  • Add an instruction screen that loads a page of instructions about how to play the game.
  • Add extra text to the module files to output a description of the module to the player.
  • Add an aspect of the story that the player can read.

There are also "super challenges" at each stage that will really stretch the more able students.


  • Create a simple text parser for the game so the player can enter MOVE and the module in the same line. E.g. an input of: MOVE 2 would move the player to module 2.
  • Further extend this to work with a range of input sanitisation options, e.g. M2 and move2 has the same effect. Don’t forget to update your player instructions screen with these new input options.


Based loosely on the films Life (2017) and Alien (1979). In the game, the player navigates around a space station called “The Charles Darwin” which has of a number of interconnecting rooms. The object of the game is to find and trap a queen alien called “Telium” that is located somewhere in the station. Not wanting to get into a conflict with humans unless necessary, the queen will attempt to escape to adjacent rooms when it is encountered. To win the game, the player must lock the appropriate room in the station so the queen cannot escape. Once trapped it can be killed with a flamethrower. A variety of additional objects are populated throughout the space station to enhance the adventure.

Also included in a Premium Subscription
196 page Essential Algorithms for Computer Science PDF
Student workbooks (1 for each topic) - GCSE ONLY
Student workbook model answers (ideal as revision guides) - GCSE ONLY
Structured Learning Records (1 for each topic) - A'LEVEL ONLY
Teacher Marking Checklists (1 for each topic) - A'LEVEL ONLY
Activities and Workshops (multiple for each topic) - A'LEVEL ONLY
Additional Activities and Worksheets - GCSE ONLY
End of topic tests (with answers)
Delivery plans / calendars
Lesson Structure PowerPoints for every topic - GCSE ONLY
Pseudo-code cheat sheet
Visual Basic Programming Guide
Python Programming Guide
Student Programming Progress Check list
Defold Programming Workshops
(Ideal for advanced programming and those moving onto A’Level)
Computational Thinking cheat sheet
Computational Thinking exercises
A set of scalable vector based logic gate symbols
Key definitions database

Registered in England and Wales: 10442992 | VAT: 290 9845 58 | 03330 164 059