The beginnings of a simple arcade game. Two hours of work. Arrows move left and right, [Z] to fire. Click here to launch.
Category: Programming
H2G2
Was browsing XYZZY News and came across a link to an online re-creation of the old Hitchhiker’s Guide to the Galaxy text adventure game , done in Flash. From what I can tell, it is completely faithful to the original game. Kudos to the BBC!
Is the Player Part of the Game
…Continuing my train of thought from my post of January 16…
I guess the primary difference between Choose Your Own Adventure (CYOA) games and Interactive Fiction (IF) games is the role of the player. Is the player in the world, or of the world? Is the player a (semi) independent agent, or little more than a glorified bookmark within the story?
In the simplest CYOA game, the player will always be in a particular state when in a particular location. If you have chosen to open the Big Wood Door, and you go to page 52, you will always be in the same state on page 52. It doesn’t matter how you got there; if you are on page 52 then you got there through exactly This Route. There are variations on the CYOA games where you may Open The Door after you Acquire The Sword, and that takes you to page 111. This is still a completely deterministic approach as you do not have the option of, say, Dropping The Sword once you are in the room. Where you are is no different from what you are. You cannot interact with the environment. You are embedded within the story. While the story may be remarkably complex it is still mapped as a two-dimensional flowchart with exactly 1 entrance and n exits, and every possible route from the entrance to those n exits is written out before you make your first decision.
Some of the CYOA -type books are meant to be played along with a random number generator (dice) and a tally sheet (inventory), but this is a bad hack-ish attempt to duplicate the behavior of an IF game without resorting to either a computer or a live storyteller.
And you cannot interact with the environment. For all intents and purposes, you as a player do not exist.
IF-type games allow interaction with the environment around the player. You are in a room. There is a sword on the ground. You pick up the sword. You go to another room. When you go back to the first room, the sword is no longer there on the ground. You have interacted with the environment.
There are objects in the world which are separate from the player, and separate from the world. The objects are in the world, not of the world.
And this is the point where the story ceases being linear and is suddenly multi-dimensional. It is non-linear (or less-linear). Decisions and actions become conditional. You are in a room with a troll. If you have picked up the sword then you can kill the troll. Otherwise the troll kills you.
The game is still linear in that it has a single entrance point and n outcomes, but the path between beginning and end can be enormously convoluted. At this point we begin to differentiate between ending the game and winning the game. And depending on the complexity of the game, it becomes increasingly unlikely that any two sessions of play will be identical.
For Nerds Only
There’s a Unicode block for the Tai Xuan Jing tetragrams . Who knew?
Another Thing To Do
In my never-ending quest to rid myself of all possible loafing time, I have decided to dive back into the world of game programming. This time I will attempt to make a generic text adventure engine, for the purpose of re-creating great games like Zork, Adventure, and Leather Goddesses of Phobos in a Flash environment.
This is the core of creating a consistent game: figuring out how all the pieces and parts fit together. Making things react differently in different environments. Defining those environments. Setting up the localized laws of cause-and-effect.
Probably the simplest type of text adventure is the choose-your-own adventure, which is essentially a mostly linear, occasionally branching, multiple choice quiz:
You are clinging to a vine halfway down the side of a cliff. At the top of the cliff a tiger is waiting to eat you. At the bottom of the cliff another tiger is waiting to eat you. Two mice are chewing through your vine. You notice a strawberry plant bearing a single, perfect, ripe strawberry growing out of the cliff next to your head.
Do you want to:
A) Climb up
B) Climb down
C) Eat the mice
D) Eat the strawberry
Quite simple, and with a predetermined path to the outcome. These adventures tend also to go in one direction. Once you pick something up, you cannot put it back down.
The text adventures a la Zork use simple language parsing which allows the player to state, in simple, precise sentences, exactly what he/she wants to do at any particular moment:
Go North
Open Door
Get Key
Unlock Door With Key
Open Door
Drop Key
Go East
Close Door
…and so forth. Suddenly we are not just moving through the environment, we are interacting with it on a significant (if limited) level When I picked up the key, I removed it from one environment (a room) and made it a part of another (me).
So now I am in an environment. In a one-person game this is a useless statement, since there is not another autonomous thing which will act within that environment in a way that will affect me. I can change my surroundings, but they cannot change me. Sure, a troll may kill me, or a thief may steal steal the key before I get a chance to use it to open a door. These are triggered, programmed events. They are part of a solvable system. The only way to make the system non-solvable is to introduce another outside agent: Another player.
This takes us into the realm of the MUD, or Multi-User Dungeon; essentially a text adventure with 1 or more players interacting with each other and the environment… and here we get far beyond the scope of what I can hope to accomplish in any reasonable amount of free time.
By the by, this genre of games is commonly referred to as Interactive Fiction
. Here are a few helpful websites:
The Brass Lantern
The Interactive Fiction Archives
Seton Hill University notes on Interactive Fiction
Play Infocom text adventures online !!! (Java applet)
Cubes, Not Politicians
Definitely Some Possibilities Here
This is Kind of Fun
Click for trippy isometric goodness.
This one may beat up on slower/older computers.
What Little Mojo Remains
Who…me?
Greeting visitors from Actionscript.com’s Flashweek ! And everyone else, of course. The post you were linked to is version .0001 of my biomorph experiments. Version .0002 (the latest one) is here , and the all of the code for this one can be found here . Enjoy!