Re: [Explorer-devel] New Tools development
Brought to you by:
supalov
|
From: Alexander S. <su...@fo...> - 2003-06-27 21:32:14
|
Hi! > WorldBase -> UnknownWorld > -> ScoutedWorld -> Asteroid > -> OwnedWorld > > in which properties like size, resources and stockpile levels are only > introduced when they are known, or should there be a single > "uberworld" class in which unknown properties are flagged with a > suitable value (e.g. size = -1). Not that I felt like guru, but anyway. There's no single most appropriate way of representing entities in a program. What is most suitable in your case depends on what you're going to achieve and at what cost. Let me give an example. If you just want to count creatures in the street, you don't really have to introduce any classes at all. If you want them to produce corresponding noises when asked to, you'll be probably better off with a class Creature that stores a respective sound clip and knows how to play it. But if they also are to catch mice and love milk, or bark at cats and prefer bones for breakfast, you're well advised to have Cat and Dog as full blown classes. Also note that back in GE there are in fact two classes of world objects. The first - the worlds as they really are - would be more suitable for a preprocessor (like a map generator). The second - the worlds as they are observed by the players - would be needed by a typical postprocessor (turn viewer, report reader, etc.). Finally, GE uses the "ueberworld" approach internally as far as the worlds observed by the players are concerned. The classification into Worlds, someone's Worlds, and Other Worlds, as well as the details of the data output in each case, is a matter of presentation which results from a series of rather involved conditionals. Best regards. Alexander |