Text-based Game

Introduction

This is more of an exercise in designing algorithms and data structures for a text-based game.

This is a good place for student discussions and whiteboard designs.

I have my own ideas but what do the students think?

Note: The initial game should be simple and limited so it can be implemented quickly.

Notes

If the user interface can be generalized, the game/maze could be read from a file (json file?). This would allow multiple games/mazes to be run by a single game engine?

Keep it simple to start with. Let the students feel out the interaction between algorithms and data structures.

General Design?

The general idea is, the player starts at a given point and selects which direction to go. The directions lead to other points, etc.

Each point has a description of what is there (what the player sees). At some points adventures/actions take place.

Arriving at one or more of the points will end the game/maze. How does the player win? What is the goal of the game? For example,

You wake up in a cave with no idea how you got there. You take inventory and you have water, food, and a flashlight. (A compass?) Your goal is to escape the cave before your water and food run out. You see two tunnels. One going to the left and one going straight ahead. Which way do you want to go?

Some Possible Game Requirements

To make the game interesting, it should have

Commands

Movement directions? (north, south, east, west), (left, right, forward, back), (up,down), ...?

Actions? (look direction), (pickup object), (drop object), (throw object), ...?

Questions

If the player finds things along the way ...

Links

5 Text-Based Adventure Games You Can Play in Your Browser

The First Text Adventure Game Ever Is Finally Open Source