User Tools

Site Tools


mbstring extension must be loaded in order to run mPDF
sd:write_your_own_adventure_games_in_basic

Write your own Adventure Games in BASIC

  • SD-8516 edition

From the Author

When I was growing up, somehow, my friend lent me his VIC-20 in exchange for my intellivision to play AD&D. I remember playing games like GOLF and PIRATE ADVENTURE. Later, I got hooked on games like Zork, the Hitchhiker's Guide to the Galaxy, and Trinity – which I still hold as the greatest text adventure game of all time. During these formative years, I spent hours typing in programs in hexidecimal from Compute! or BYTE magazine. I read all the books in the school library about computers. Books like Usborne's “Write Your Own Adventure Programs for your Microcomputer”. I was hooked.

This is not that book, but it is inspired by it and all the great BASIC programming books of yesteryear. It is my sincerest wish that this book finds a place in your heart alongside the old greats like those.

CHAPTER 1: What is an adventure game?

Types of Adventure Games

In 1974 Peter Langston wrote Wander, a kind of text adventure game creator. Then in 1975, William Crowther and Don Woods wrote “Colossal Caves”, also known as “adventure”. It's a good game.

The genre took off, and by 1978 Scott Adams had released Pirate Adventure. I played it on the VIC-20 when I was 5. It was a masterpiece. Later, games improved. I recall with fond memories “Ulysses and the Golden Fleece” and many similar adventures. Then the genre expanded; Alice in Wonderland, Phantasie Star, The Bard's Tale, Ultima 4. There were so many games to play!

The thing that I remember most of all, is that these works of art allowed me to become a part of a fantasy or science fiction world. The narrative is what mattered most. I was just at home in a Peter Jackson and Ian Livingstone Sword and Sorcery novel as I was in a D&D campaign. And, these kinds of games on the computer brought that experience into the real world in a way that fascinated me.

To me, that's what an adventure game really is; a story, a story that draws you in and lets you become a part of it. From Maniac Mansion to Trinity, from Ultima 4 to World of Warcraft, this is lesson #1. Your adventure program needs a strong story. It needs context – a world – it needs art. These are the fundamental building blocks of our imagination, and these factors alone will make or break your adventure game, no matter what form you choose for it to take.

Where to start

Let's start small, with a typical “CYOA” (choose your own adventure) style game. These are the easiest of all games to make, and if you start here with me, I will take you on a journey unlike any other. Let's begin in the grassy field – a clearing, in a forest. It's a sunny day.

100 CLS
110 PRINT "Welcome to the Adventure!"
120 PRINT "Would you like instructions (Y/N)? "
130 LET A = GETKEY()
140 IF A = ASC("Y") THEN GOTO 200
150 IF A = ASC("y") THEN GOTO 200
160 IF A = ASC("N") THEN GOTO 500
170 IF A = ASC("n") THEN GOTO 500
180 GOTO 130 

200 REM INSTRUCTOINS
210 PRINT "I will be your eyes and ears."
220 PRINT "Direct me with simple commands,"
230 PRINT "such as GO WEST (or WEST) to move,"
240 PRINT "TAKE LAMP, or EAT FOOD."
250 PRINT "You can type SCORE, INV, or QUIT."
260 PRINT "If you need help, type HELP."
300 PRINT ""
310 PRINT "Story:"
320 PRINT "Somewhere along this quiet rural route"
330 PRINT "lies an old farmhouse with a reputation"
340 PRINT "for forgotten secrets."
350 PRINT "Most weekend hikers pass it by without"
360 PRINT "a second glance. But on certain days,"
370 PRINT "when the light shifts just right, the"
380 PRINT "place seems to... wait."
390 PRINT "One sunny day, you are on a relaxing"
400 PRINT "stroll down an old country road to lose"
410 PRINT "the pressure of city life. Suddenly you"
420 PRINT "find yourself looking for shelter in"
430 PRINT "a coming rainstorm. You never expected"
440 PRINT "to find this house. It, however, *was*"
450 PRINT "expecting you..."
460 PRINT ""
470 INPUT "Press ENTER to continue:", A$

500 CLS
510 PRINT "Rural Route Bend"
520 PRINT "You are on a peaceful hike along an old"
530 PRINT "country road, enjoying a stress-free"
540 PRINT "weekend escape from the city. The day"
550 PRINT "started bright and sunny, but a large"
560 PRINT "cloud has drifted overhead, offering"
570 PRINT "welcome shade."
1000 PRINT ""
1010 PRINT "As you round the bend, a long gravel"
1020 PRINT "driveway with a white picket fence"
1030 PRINT "and a field on the left winds westward"
1040 PRINT "towards a barn and an old one-story"
1050 PRINT "farmhouse. Its paint is faded, but it"
1060 PRINT "has the comfortable look of a long-"
1070 PRINT "loved family home."
1080 PRINT "It appears to be abandoned."

This is the start of our game. Although it may seem like nothing special is going on here, this is the most important part of the story. A good start will increase the player's experience of the game.

under construction!

sd/write_your_own_adventure_games_in_basic.txt · Last modified: by appledog

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki