Hack80.Create Your Own Adventure Game

Hack 80. Create Your Own Adventure Game

Use Adventure Game Studio to make a classic point-and-click .

Hey, remember point-and-click adventure games ? I sure as heck do. Classic series like Sierra's King's Quest and Leisure Suit Larry, and of course LucasArts' Monkey Island and Sam and Max, were the reason I counted myself among the PC gamers in the nineties. The genre never had to die, but die it did as Sierra and Lucas quit producing adventures after games moved to 3D and the market for hand-drawn games dried up.

And so, the point-and-click became pointedly retro. But hope is not lost. If you've read Gaming Hacks (O'Reilly), you've learned how to run classic LucasArts adventures on your modern-day PC. And in this very book you've already seen how to run your classic Sierra games on your Game Boy Advance [Hack #47] . But what if all these retro puzzlers aren't satisfying your need for adventure? Well, have you ever thought of making your own?

"Nonsense," you say. "I have no programming knowledge whatsoever." Maybe so, but this hack is dedicated to proving that you don't need it. As long as you're a relatively intelligent individual (and you must be if you're reading this) you can use Adventure Game Studio (AGS) to create your own point-and-click adventure in whatever style you please . And the program will even distill your game down to a single executable file so you can distribute the game freely (or commercially, if you really think you have something people would pay for). In this hack we'll create a very basic adventure in just under an hour . Readygo!

First, head to the AGS project's official home page, http://www.adventuregamestudio.co.uk, to download the game engine. Note that it requires Windows 95 or greater, but a Linux port of the game engine is available, meaning that you can run any of these games on Linux (but not Mac, sadly). Unzip the ags_262.zip archive to a new directory, then run agsedit.exe to launch the program.

At the first menu, choose to create a new game. Use the Default Game template rather than the Blank Game, and name it whatever you want. If you want the game to run under DOS, keep the filename to eight characters or less. You'll then be asked to pick the game's resolution. For purposes of this hack, stick with the ultra -old-school 320x200 resolution. Once you do that, you'll see the program's main menu, shown in Figure 8-31.

Holy cats, that's a lot of checkboxes! Here's some good news: you can ignore them all for right now. You are, however, going to mess around with your game's color mode. In the left menu tree, click on Palette. By default the game is in 256-color mode, but you have to pick each color individually. Let's not bother: click on "Change game's colour depth" and select 16-bit color . Now you can use whatever hues you want, at a minimal sacrifice to game speed.

Now let's create a room. Minimize AGS and open up your favorite paint program. Start with a canvas that's 320 pixels wide by 200 pixels tall (that's the resolution you chose for the game, remember). Now get to drawing. For the purposes of this hack, I suggest drawing a path leading into a forest, as seen below. Save it as a bitmap file (not .jpg ). If you're not even this artistic, you can download my ultra-snazzy sample image, shown in Figure 8-32, at this book's web site (see "How to Contact Us," in the Preface).

Figure 8-31. Adventure Game Studio's game settings menu

Figure 8-32. My very first adventure game background

Back in AGS, click on the Settings tab under Room Editor in the menu bar. Click the picture of a tree to import your saved bitmap as a room (see Figure 8-33). It will appear in the black area below all the buttons and such.

Those yellow lines over it can and should be dragged aroundthey represent the edges of the room, the point at which the player will be transported to a new screen. (Hypothetically, of course, since you're only making one screen.) The left line should already be in place, since the left exit is at the far left of the screen. Place the right line so it roughly lines up with the entrance to the forest. The top and bottom lines can go anywhere as long as they're not inside your yellow path.

Figure 8-33. The Room Settings menu. Click and drag the yellow lines to demarcate the edges of your room.

Now it's time to define where the player can walk around. Click on the Areas tab in the left menu, and you'll see a dialog box that says Show This Room's: Hotspots. I'll come back to this later, but first click on the Hotspots drop-down box and select Walkable Areas (see Figure 8-34). Now it's just like using a paint program. Using the Line, Free Draw, and Fill tools, fill in your yellow path with blue. Use the Line tool to outline the walking area, then use Fill to get the whole thing (if your whole map turns blue, you didn't outline the area properlyhit Undo and make sure your lines are connected).

Figure 8-34. Walkable areas, all filled in

Now save your room by clicking File/Save Room As. Name it room1 or anything, really. Next , you're going to make sure the character starts off in the right place. Move your mouse over the walkable area and find where you'd like the character to be standing when the game starts. Note the X and Y coordinates that the game gives you under the heading "Mouse pos" ("pos" stands for position ).

In the left-hand menu tree, click Characters and you'll see the default character, Roger, so kindly provided for you in the Default Game template. You'll see boxes labeled "Starts At," so enter the X and Y coordinates that you just made a note of.

Now you're ready to test the game. First, save it by clicking File Save Game. Before you test, click File Preferences, and change the Game Testing State box to "Force Windowed." This will make the game open up in a window rather than going fullscreen. If youd like to see your adventure in fullscreen mode, leave this box as is and click File Test Game. Try things out yourself for a while! You havent added interactivity, but you can move the mouse to the top of the screen to access the GUI buttons (see Figure 8-35), or you can right-click the mouse to cycle through the standard Walk/Look/Talk/Use icons. Try them on Roger!

Figure 8-35. Retro Gaming Hacks: The Adventure

Fun, eh? No, not really. But you should still have some of your hour left, so let's add things to do. Go back to Room Areas and change that dialog box that says Walkable Areas back to Hotspots. Use the same paint-style tools to draw a filled box around the leaves of the trees. Above, you'll see an up arrow and a down arrow. Click the up arrow and you'll be making a second hotspot. Go ahead and draw this one in the tree's trunk.

Now you'll add interactivity to these hotspots. Click the down arrow to go back to Hotspot 1, then click Interactions. Right click Look At Hotspot. From the drop-down box, select Game Display a Message. Click Edit Message, then click New Message (see Figure 8-36), then type what you want the game to say when you look at the green tree branches. Insert an environmental message or poke gentle fun at the extremist sect of the environmental movementits up to you.

Figure 8-36. Message editor

Now go back and do the same thing all over again for Hotspot 2 in the tree trunk. But this time, write the message "The trunks seem to want to talk to you." Get it? It's a clue as to what you should do next! You're writing a real adventure game now!

So you want to make the trunks chat you up. Go back to the Interaction Editor and click the Talk to Hotspot line. Add in a Game Display a Message for whatever you want the wise old tree trunks to say. Then well reward the player. Right click the Display a Message line that's just been created, and select Add another interaction after this. Choose Add Score on First Execution.

Click "Change," then change the Value field (shown in Figure 8-37) to 5. You're giving the player five points for being smart enough to talk to trees! You've made an adventure with puzzles, scores, and everything! Too bad it's not fun unless you really, really dislike hippies. And even then. But save the room, save the game, and try it out (check the results in Figure 8-38)! And if you want to play my version (and discover the hidden surprise I left in there without telling you), download it at this book's web site (see "How to Contact Us," in the Preface).

Figure 8-37. The Configure parameter dialog box

Whew! You've created your own adventure game in just under an hour or so. If you'd like to see where many, many, many such hours can get you, check out the awesome Award Winning games section at http://www.adventurestudio.co.uk. And to continue with your training, you might start with the lengthy beginner's tutorial at http://www.bigbluecup.com/acintro.htm. Happy adventuring!

Figure 8-38. The forest is angry with the unseen hippies



Retro Gaming Hacks
Retro Gaming Hacks: Tips & Tools for Playing the Classics
ISBN: 0596009178
EAN: 2147483647
Year: 2003
Pages: 150
Authors: Chris Kohler

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net