User Tools

Site Tools


sd:write_your_own_adventure_games_in_basic

This is an old revision of the document!


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 PRINT “Welcome to the Adventure!” 110 PRINT “Would you like instructions (Y/N)? ” 120 A = GETKEY() 130 IF A = ASC(“Y”) GOTO 200 140 IF A = ASC(“y”) GOTO 200 150 IF A = ASC(“N”) GOTO 500 160 IF A = ASC(“n”) GOTO 500 170 GOTO 120

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 PRINT “”

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

sd/write_your_own_adventure_games_in_basic.1774801404.txt.gz · Last modified: by appledog

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki