Note: This page is no longer being maintained and is kept for archival purposes only.
For current information see our main page.
StoryHarp Kurtz-Fernhout Software
Developers of custom software and educational simulations.
Home ... News ... Products ... Download ... Order ... Support ... Consulting ... Company
StoryHarp
Product area
Help System
Index
Introduction
Definitions
Tutorials
Worlds
Agent
StoryHarp & IF
StoryHarp & Java
Registering

A simple example audioventure

This section will cover a simple example adventure, without reference to how to input it into the editor. The complete result is available in the file Intro.wld. If you are raring to go, skip over to the tutorial to get your hands dirty!

The simplest adventure

The simplest adventure would be a bunch of commands which always give the same replies. You might think this would be pretty boring -- and it probably would be. However, even such a simple adventure is enough to compose some puzzles, if you reply on posing questions to the user which require thought or research outside of the game.

Let's construct such a very simple adventure, consisting of eight rules in one context.

context
command
reply
lobby
look
You are in a hotel lobby. There is a fireplace here. There is a burly porter here. There is an old man here.

lobby
examine the fireplace
It has the phrase 'the plains' carved on the mantelpiece.

lobby
talk to the old man
He says, "Sorry, I only like to talk in French".

lobby
talk to the porter
He says you need to answer the capital of Iowa to win the game.

lobby
give me a hint
{sound raspberry} Oh, come on. You have to figure this out on your own. Try a road atlas if all else fails. But if you're still having trouble, you need to say 'answer' and the name of the place, like 'answer New York City' -- which is wrong by the way!

lobby
$answer new york city
New York City! You must not get out much. Either that or you've peeked at the hint.

lobby
$answer ames
{sound buzzer} Ames is wrong. Try again.

lobby
$answer des moines
Des Moines means 'the plains'. {sound clangy bells}You win!

Notice that with very little effort we have set up a context with two characters and a simple puzzle. (Note that the sound files shown here are for example only and are probably not on your computer.)

Adding movement to our adventure

Let's say we want to allow the player to take the bus to the local library to consult an atlas there. We need to use the move field to do that. Here is an example, adding four new rules to the previous eight.

context
command
reply
move
lobby
take the bus to the library
You go outside and catch the diesel bus to the library.{sound bus}

library
library
look
You are in a modern library facility. There is an atlas here.


library
consult the atlas about the capital of Iowa

The atlas shows the capital of Iowa is Des Moines.

library
take the bus to the hotel
You take the diesel bus back to the hotel {sound bus} and enter the lobby.
lobby
Adding conditions to our adventure

Let's say we want to allow the player to ask the old man to translate 'the plains' into French. But, we only want to allow this after they have looked at the fireplace, and after they have talked to the old man. We do this by using the requirements and changes fields. Here is an example, modifying two of our existing rules and adding another.

context
command
reply
requirements
changes
lobby
examine the fireplace
It has the phrase 'the plains' carved on the mantelpiece.


examined the fireplace
lobby
talk to the old man
He says, "Sorry, I only like to talk in French".


talked to the old man
lobby
ask the old man to translate 'the plains' into French
He says, Oh, that's easy. 'Des Moines'.
examined the fireplace
talked to the old man


Anything in the changes field will create a variable (initially false), which will be set to true when the change is done. The variable could also be set to false if prefaced by a '~'. The requirements field tests to see if the referenced variables are true (or false if prefaced by a '~'). We used the text of the command in the past tense to set up a variable to record that the player has done that command. However, we could have used something else like 'fireplace examined' or 'discovered old man knows French'. When using the editor it is easiest to just drag the command phrase into the changes field rather than type in something new (more on this later), but using exact command phrases as requirements and changes can lead to confusion, so it is best avoided.

As a word of advice, you will probably spend more time reading over your rules then typing them in, so please choose long useful phrases to describe variables. Avoid ambiguous abbreviations like 'talked' or 'tlkd' or 'examnd fir'. It uses very little extra memory to have long phrases and has little effect on the speed of the program. The more specialized you make your variable phrases, the easier it will be to add new ones. For instance, what if later you decide to add a second old man who does not know French? In that case 'discovered old man in lobby knows French' is better than 'talked to the old man'. Or give the old man a name like Pierre (even if the player doesn't ever know it).

Putting it all together

Here is our complete two room adventure, consisting of thirteen rules, providing two ways to learn the capital of Iowa (the end goal).

context
command
reply
move
requirements
changes
lobby
look
You are in a hotel lobby. There is a fireplace here. There is a burly porter here. There is an old man here.




lobby
examine the fireplace
It has the phrase 'the plains' carved on the mantelpiece.



examined the fireplace
lobby
talk to the old man
He says, "Sorry, I only like to talk in French".



talked to the old man
lobby
ask the old man to translate 'the plains' into French
He says, Oh, that's easy. 'Des Moines'.

examined the fireplace
talked to the old man


lobby
talk to the porter
He says you need to answer the capital of Iowa to win the game.




lobby
give me a hint
{sound raspberry}Oh, come on. You have to figure this out on your own. Try a road atlas if all else fails. But if you're still having trouble, you need to say 'answer' and the name of the place, like 'answer New York City' - which is wrong by the way!




lobby
$answer new york city
New York City! You must not get out much. Either that or you've peeked at the hint.




lobby
$answer ames
{sound buzzer}Ames is wrong. Try again.




lobby
$answer des moines
Des Moines means 'the plains'. {sound clangy bells}You win!




lobby
take the bus to the library
You go outside and catch the diesel bus to the library.{sound bus}

library


library
look
You are in a modern library facility. There is an atlas here.




library
consult the atlas about the capital of Iowa

The atlas shows the capital of Iowa is Des Moines.



library
take the bus to the hotel
You take the diesel bus back to the hotel {sound bus} and enter the lobby.

lobby


Now you understand almost everything there is to know about developing a simple StoryHarp adventure.

For advanced users: contexts can be more than locations

StoryHarp supports complex uses of contexts. You can think of the StoryHarp system as a sort of mind. It focuses on one context at a time, yet can still be aware of other active contexts and their implications simultaneously. For example, StoryHarp might be focused on a location (context) like a hotel lobby where actors can come and go. Each actor could also be a context, with commands that the actor can respond to when the actor's context is active (true). When the variable corresponding to an actor is set to true, that is equivalent to the actor arriving at the current location. Setting the actor's context to false is like making the actor leave the current location. Whenever the player moves and the focus shifts to a new location (context), any actor with an active context will seem to move with the player. One may also model an actor's arrival and departure by putting requirements on the availability of commands in an actor's context tied to a specific location (another context).

Besides actors, other things can be contexts, like objects, emotions, and mists. There is no specific limit to how many contexts may be active at the same time. So, you might be in a forest with a mist, Friar Tuck, Little John, a sack of gold coins, and a feeling of well-being. Each of these six items could be an active context, with the forest having the focus. When you try to run off with the gold coins, the feeling of well-being might be made inactive (false), and an air of hostility might become active (true). That in turn might effect the availability of other commands throughout the rest of the adventure until you did something to remove (set to false) the air of hostility (like helping rescue Robin Hood). Managing multiple active contexts can be tricky; so don't worry about it at the start.

Again, you can find this simple example in the file Intro.wld.

See also:

Essential definitions

Examining one rule in detail

Top twelve tips for authoring audioventures

Home ... News ... Products ... Download ... Order ... Support ... Consulting ... Company
Updated: March 10, 1999. Questions/comments on site to webmaster@kurtz-fernhout.com.
Copyright © 1998, 1999 Paul D. Fernhout & Cynthia F. Kurtz.