From: amitp@owlnet.rice.edu (Amit J Patel)
Subject: Re: Discussion starter
Reply-To: amitp@owlnet.rice.edu
Organization: Rice University
Date: Wed, 7 Oct 1992 13:27:29 GMT

In article <1992Oct6.181730.9070@wam.umd.edu>, angelrat@next12pg2.wam.umd.edu (...a gruesome) writes:
|> > I love playing Ultima 7 not to "win" but to interact with the hundreds
|> > (thousands?) of people, selling & buying food, talking, stealing a
|> > cow, etc.  :) You can get a job at various places; if you talk to some
|> > farmer, he will hire you to pick pumpkins for him; if you talk to some
|> > baker, he'll teach you _how_ to make bread, and then he'll offer you a
|> > job as an assistant baker.  You can use the wells & buckets to get
|> > water, mix it with flour, put the dough in a bowl, put the bowl in an
|> > oven, turn on the oven, and a few minutes later, you have bread!  In
|> > U6 I think, you could milk cows, get milk, put it in a churner and get
|> > butter...
|> > 
|> > In RPGs, you just fight monsters & try to accomplish some goal; in  
|> Ultima,
|> > you can do whatever you want!  ("Top Adventurer retires and becomes a 
|> > farmer!")
|> > 
|> > -- 
|> > /\\ Amit J Patel, amitp@owlnet.rice.edu
|> > \\/ I think I'm at Rice University 
|> 
|> 
|> 
|> yeah!!!...i loaded up my Ultima6 game just to use the secret cheat menu
|> and interact with people and stuff!.....i love those type of games like
|> that (very few..) where the entire programming in the game is not
|> dedicated to finishing/winning the game...i got Ultima7 just
|> for the bigger (better ?) graphics, interface and to 'watch the world
|> go 'round..')
|> 
|>  

So let's try to figure out how to write this!  :)

While playing, I thought of objects with some 'methods':

	display		Displays the object on a bitmap that is
			later pasted onto the screen

	collision(P)	returns true if the object occupies the
			same space as object P; we could attempt
			to move, and if we find a collision with any
			other object, we can prevent the move.  This
			is probably not the best way to do things.

	use		Performs the primary action of the object
			(activated by a double click from the player)
			People -> talk
			Containers -> open/close
			Doors -> open/close
			Cows -> produce milk
			Lamps, Candles, Torches -> turn on/off
			various other objects do their special things
				(like the crystal ball in U7 brings
				 up the map)

	move		This would be called when the player or
			other character tries to move the object; maybe
			it could depend on the strength of a character.

	defend		This would be called when somebody attacks
			the object; a monster would turn hostile,
			a door might break, a chest might explode, etc.

	act		Based on the time of day, perform some action.
			Every time there is nothing else to do, the system
			would make some object Act; this would allow the
			people in the game to go to sleep or each lunch
			at the right times.

	used(X)		Sometimes, one object can be used on another;
			If X is used on this object, we can do something
			here.  I guess we'd have to check what kind of
			object X is before we do something...  (for 
			example, using the bucket on a well fills the 
			bucket with water)

In Ultima, objects are only "run" (with 'act') in a small area (maybe
4 screenfulls) because the world is too large to run everyone.  This
might cause synchronization problems, like people staying awake all 
night, but if it's 4 screenfulls of running, maybe the Origin folks
manage to get everyone to bed before you walk onto their screen.  :)

I'd like to write some very simple game (maybe with an 80x25 board :) )
where I can put some objects in and let them run.  I think this will
be fun!

	Amit

-- 
/\\ Amit J Patel, amitp@owlnet.rice.edu
\\/ I think I'm at Rice University 
Xref: sparky rec.games.programmer:4269 comp.programming:2911