Mac Text Based Adventure Games

Programming Text Adventures in BASIC[edit]

While there were other text based computer games before Adventure like STARTREK (incidentally our first release - Star Trek Classic), this was the first text based 'interactive fiction' game.

Welcome to Programming Text Adventures in BASIC.
Hopefully in reading this guide you will be able,
to program your own text adventures.


What Will I Need?[edit]

I assume a basic knowledge of the BASIC programming language (please spare the puns).
I also assume you are using a old BASIC interpreter or compiler such as Quick Basic, Free BASIC
or Chipmunk Basic. (Qbasic is recommended only for Microsoft systems)
I assume you are good at computers, play or played a text adventure before.

Starting to Code the Adventure[edit]

So what are text adventures? What is interactive fiction? You've probably played Zork, Adventure, or many others.Interactive fiction or text adventures are very fun to play and communicate a great sense of environment to theplayer. They rely on story-telling, treasure finding, and sheer elements of adventure. If you have never played atext adventure, and would like to get an idea of what a text adventure is like exactly, here's a link to an online version of zork: http://thcnet.net/zork/index.php .

Now let's write a text adventure in Basic.

Mac text based adventure games free

Note: when creating a game, you should code the introduction LAST. Dive straight into coding the game!

(You really don't need a REM for comments. As an alternative, start the line with a ' )

Enter this Program into Your BASIC Interpreter or Compiler

(by this day and age, you don't need a number at the beginning of each line (no 10,20,30 on every line)


Remember, the journey of a thousand miles starts with a single step!

Text Based Adventure Games Mac

Coding Rooms: Arrays & Data[edit]

Okay by now we have a introduction and a beginning, now we need a room. Of course, a room means anythinga dungeon, a spacecraft, or a musty cavern filled with flesh-eating zombies.


To do this, you need a data array. In short, think of an array as a 'storage bin'. You know how for variables, youwould use something like triangle = 9 or name$ = 'Julius'? Well, an array is like an extended set of variables.

To use an array in your text adventure, you must first understand what an array looks like:

Mac Text Based Adventure Games Game

Here is an example of a simple data array that has 5 names stored and lists them on the screen:

Mac Text Based Adventure Games To Play

Retrieved from 'https://en.wikibooks.org/w/index.php?title=Programming_Text_Adventures_In_Basic&oldid=3450815'

Comments are closed.