From: plambert@plc.cs.psu.edu (Paul  Lambert)
Newsgroups: rec.games.design
Subject: Re: Generic Object Description
Date: 13 Apr 92 20:22:07 GMT
Organization: Penn State Computer Science

In article <1992Apr13.141226.26370@nynexst.com> baruch@nynexst.com (Robert Baruch) writes:
>wt0b+@andrew.cmu.edu (William Henry Timmins) writes:
>: >  Yes, simulations can get very detailed, but the amount of
>: >information for each object grows as your world becomes more precise.
>: >I'd hate to have to enter the chemical composition of a cave troll
>: >just to have something interesting in the cave...
>: 
>: How about having types of objects, so that you only vary the
>: particulars? Like- 'terrestrial animal life form' for people and similar
>: beings, 'trollish animal life form' for a variety of beings based on,
>: say, a troll type composition. And so forth. ('masonry' could handle a
>: lot, and so forth)
>: 
>: -Meow
>
.
.
.
>So the values in the list of parameters would not necessarily immediately
>tell you that the object in question is a "weapon" or a "key", but its
>name sure will.  So when a person comes across the object "two-handed sword",
>he'll immediately know it's a weapon.  How that weapon acts is up to the
>parameters.
>
>Caveat:  An object designer has to think about each object carefully.  For example,
>there is no such thing as a class of "projectile weapons".  So an object designer
>will have to characterisea "gun" as a thing which causes an object "bullet" to
>be thrown at great velocity.  The gun object would have to have a built-in
>action throw_object, which would be able to manipulate the bullet object (if
>you have any!).
>
>But the system should be designed so that aside from describing what the object is,
>and what it's primary purpose is (the gun fires bullets), nothing else should
>have to be said about it -- default action functions should take care of that.  So
>if I decide to bop someone over the head with my gun, GOD should know
>immediately that the guy keels over, eyes crossed, even though the object
>designer did not specify what happens
>
>Problem:  Suppose I design a sword object, and then want to hit someone over the
>head with the flat of my sword.  This should not kill that person.  But if I
>do not specify what happens, I would just kill the person because the sword is
>sharp and force-multiplicative.  How can we design a system where I can say
>"Hit man on head with flat of sword" and have the right things happen?  Does
>the object designer need to pull this out as a special case and write a
>function for it?  Probably, since the "flat" of a sword is different from the
>"flat" of a gun, especially since guns have no flat!

Sounds to me exactly like a SmallTalk model for Objects: define an Object which
has a location, temperature, etc... then define a LifeForm which inherits those
features from Object, but has its own things.  You could make a Troll as a type
of LifeForm, then make a Two-HeadedTroll as a type of Troll.  Et cetera ad
infinitum.  This would give you EXACTLY the type of model you're looking for.
If an Object defines an impacted message, then you can hit someone over the
head with a Troll (assuming you can lift it!) and it'll work.  But if Trolls do
something special when you swing them, you can override it.

So what's the problem?  You would have to hardcode all of this... find someone
who has written an OOE (Obj-Oriented Environment) and see how they did it (I
couldn't do it if my life depended on it...) to figure it out.  Then you'll
just need a decent parser to drop your ideas from text to messages.

--Paul

(ignore this entire message if it makes no sense!)

--
-------------------------------------------------------------------------------
plambert@psuvm.psu.edu, plambert@endor.cs.psu.edu, or just plambert@cs.psu.edu
Organization: Carnegie Mellon, Pittsburgh, PA