Monday, May 23, 2011

Interactive Building - Nougat Cave Hunt and the Key/Door Example

Last Thursday I spent a couple of hours overnight setting up a very simple (as far as game mechanics go) game in the SW City Airpark Pavilion.  The game, called Nougat Cave Hunt, is a simple seek-and-find where the player is prompted to collect and return 10 items (nougats, a creature of the SW City lore) within 120 seconds.

Pesky little critters them.

The mechanics for keeping count of the items and the time elapsed was done with SW City Interactive, but similar applications can developed in Active Worlds using only action commands.  There are certainly some limitations, but creative design can usually overcome them.


The Simple Hunt

When designing a game in AW, my experience has been that its best to think about the game mechanics first, and then work from there.  This is because there are a lot of things that object scripting leaves to be desired, and sometimes you have to tweak your concept a bit to get everything to line up.  In this example, we'll run with the concept of a hunt for an item, but since AW doesn't really do counting instances very well we will switch things up a bit.

CONCEPT: Player has find a hidden key, and click it to open a barred gate.

This is a simple game concept that has been executed in Activeworlds many times, but it is a good place to start because it gets builders thinking and creative and multiple uses of building commands.  With this in mind, lets introduce our objects.

KEY OBJECT ACTION LINE: activate visible no, solid no, move 0 4 0 time=3 wait=10 smooth name=gate

GATE OBJECT ACTION LINE: create name gate

So now we have our two objects.  See?  Simple.  Basically, what happens here is that the activate trigger applied to the key causes it to disappear from the scene (visible no, solid no) and it also causes the gate to rise 4 meters because the move command has a name parameter that is applied to the gate (name=gate, create name gate).

It isn't difficult to expand on the complexity of this interaction and make it into a challenging mini-game.  For example, you could set more keys and more doors, and require the player to pass through the gates before the wait parameter expires.  You could also set a hard time limit using a timer command.

There are many possibilities for hide-and-seek style gaming with object scripting, and if you'd like to share any examples... feel free to post them in the comment section!

No comments:

Post a Comment