[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Inform] Perspective based coding of objects
- Subject: Re: [Inform] Perspective based coding of objects
- From: lpsmith@rice.edu (Lucian Paul Smith)
- Date: 07 Dec 1999 00:00:00 GMT
- Newsgroups: rec.arts.int-fiction
- Organization: Rice University, Houston, Texas
- References: <1c134.17692$n3.358996@news0.telusplanet.net> <384d462c.132154812@207.69.128.120>
jim crawford (pfister_@hotmail.com) wrote:
: On Tue, 07 Dec 1999 05:47:41 GMT, "Don Rae" <donrae@telusplanet.net>
: wrote:
: >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!)
: What would be better would be to get the Inform library to deal with
: something like:
: object corn cornfield
: with
: joes_title "ear of corn",
: space_aliens_title "class 7623 seedling",
: beatniks_title "big yellow joint",
: joes_name 'ear' 'of' 'corn',
: space_aliens_name 'zarfa' 'class' '7623' 'seedling',
: beatniks_name 'big' 'yellow' 'joint'
: ;
Classes, classes, classes.
Class Perspective
with short_name [;
switch(player) {
joe: return self.joes_title;
alien: return self.alien_title;
beatnik: return self.beatnik_title;
}
],
joes_title self.generic_title,
alien_title self.generic_title,
beatnik_title self.generic_title,
generic_title "BUG: This object has no unique short name.";
Same thing with...well, anything. Even before routines. A class
parse_name could even handle the individual name properties.
I suppose I should get off my duff and write the game like this I've been
thinking of for a year now, shouldn't I?
-Lucian