[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Inform] Perspective based coding of objects
Once I'm finished with my current project, I want to try something a bit
unusual.....I've toying with the idea of building an Inform based game with
an interface that is similar to "Suspended" in some respects - the game
would likely have different characters that would be ordered around, and
they would all have different "perspectives" on the things they see in front
of them....(and yes, I am anticipating a coding nightmare!)
Here's an exagerrated example of the type of situation I have in mind:
A regular Joe, a space alien, and a "slightly high beatnik" are all in the
same area, viewing and interacting within the same scene. Each character is
likely to have a different viewpoint and interaction based upon on what they
see and understand, and are able to have similar, yet different experiences
with the same objects....
----------------------------------------------------------------------------
-------
>JOE, LOOK.
Joe's Corn Field
The corn crop looks pretty good this year, and it waves slightly back and
forth in the breeze. A well-worn truck path leads to the north from here.
Your pickup truck is silent, having been shut off unexpectedly.
You look in amazement at the enormous saucer-shaped spacecraft, which landed
directly in front of your truck. Unfortunately, it looks as though it's
completely crushing a dense section of your crop.
You see a green colored, four legged creature standing in front of the
flying saucer.
There is a bearded middle-aged fellow standing among the corn stalks, his
wide eyes looking directly at the spacecraft in a glazed expression.
You see an ear of corn that has been knocked off one of your prized plants.
>JOE, TAKE THE EAR OF CORN.
Taken.
>JOE, EXAMINE THE CORN.
It was not ready for picking, and this one is spoiled for sure.
>SPACE ALIEN, LOOK.
Terra 3-Sector 348724
The abandoned area you selected for your landing has several fromit-colored
stalks that are moving back in forth, due to the gravitational and
atmospheric pressures that have swept across the area. There is a worn out
trail to the joonast.
A metallic object is here, perhaps a primitive offering by the humans.
Your Omnilord Mark 7 battlecruiser is resting on the landing zone, anxiously
awaiting your remote attack command.
There are two humans here, both staring at your magnificent presence in
apparent awe.
There is a category zarfa class 7623 seedling lying on the ground here.
>SPACE ALIEN, TAKE THE SEEDLING.
Taken.
>SPACE ALIEN, EXAMINE THE SEEDLING.
You wave your portable nutrient analyzer over the seedling, but you discover
it to be highly toxic.
>BEATNIK, LOOK
Wavy Plants
Communing with the plants leads to some wild times, man. The gentle caress
of the far out greens around you is exactly what you needed to set your
karma straight, but now you're standing in a clearing of some sort that
extends to the east, or is it the south? It's hard to tell right now.
Check out the blue truck - it's sinking into the ground! Woah! It's coming
back out again! Now that's wild, man.
And that is the biggest looking frying pan you've ever seen! And it has legs
to boot! This is one of the best trips you've ever been on, for sure.
There is a green dude here. He appears to have eight legs.
There is a bearded dude here. He appears to have four legs.
Hey, that looks like a big yellow joint lying on the ground!
>BEATNIK, TAKE THE YELLOW JOINT.
Taken.
>BEATNIK, EXAMINE THE YELLOW JOINT.
Wow....this is the biggest joint you've ever seen! Maybe that green dude
over there has a light?
----------------------------------------------------------------------------
-------
Some of the problems I'm anticipating with this type of game model include:
1) Inform's known synonyms for all the game objects. (ie - Joe should not
be able to refer to the ear of corn as a "seedling" or a "joint". Is it
then easier to implement multiple objects that refer to the same object, or
can this basic problem be overcome easily somehow in Inform?)
2) Multiple "descriptions" for each object, in all areas. (Through causing
the object's description fields - initial, short_name, description,
inventory description, etc - to change dependant upon "who" is looking or
referring to it Can this kind of thing be easily implemented from the
viewed object? Any comments?)
3) And, of course, the headache of dealing with slightly altered commands
for each person, essentially resulting in the same "type" of result. (ie.
Joe should be able to go north, the space alien should be able to go
joonast, and the beatnik should be able to stumble in a direction he thinks
is south, but is really north. I've done this type of thing before, but
this is likely to turn into a headache....Joe should not be able to "go
joonast", for example.)
If anyone has any coding samples of each kind of coding situation as
described here, I'd greatly appreciate it. Do any of the current animate
object libraries have this kind of support? I'm starting to appreciate, in
my own mind, some of the coding effort Mike Berlyn must have went through
when he wrote Suspended. Hats off to you, Mike.
- Don