| Home >> All >> org >> metacosm |
| | org.metacosm.bin2xml.* (14) | | org.metacosm.framework.* (158) | | org.metacosm.tests.* (8) |
| | org.metacosm.ui.* (17) | | org.metacosm.util.* (19) | | org.metacosm.zheroez.* (5) |
Package Samples:
org.metacosm.framework.entity.relationship
org.metacosm.framework.entity.affect
org.metacosm.framework.entity.memory
org.metacosm.framework.entity
org.metacosm.framework.parser
org.metacosm.framework.perceptions
org.metacosm.framework.interact.actions
org.metacosm.framework.interact
org.metacosm.framework.command
org.metacosm.framework.random
org.metacosm.framework.quest
org.metacosm.framework.server
org.metacosm.framework.persistence
org.metacosm.framework.event
org.metacosm.framework.controller
org.metacosm.framework.world
org.metacosm.bin2xml
org.metacosm.tests
org.metacosm.util
org.metacosm.zheroez
Classes:
CollectionFactory: This factory encapsulates the creation of Collections. A configuration file is used to get Collections returned by *Pref* methods. The configuration gile is 'CollectionFactory.properties'. Example: Collection myCollection; myCollection = CollectionFactory.createPrefCollection(); myCollection = CollectionFactory.createStandardCollection("ArrayList"); TODO: CHECK FOR ERRORS!!! clean up code and optimize improve documentation improve type checking in methods create optimized version for Pref (using cache) create synchronized versions create version with load factor? add initial capacity and load factor ...
Parser: The Parser is used to parse (!) input streams from players. It's also a Singleton OOD pattern. The following grammar is accepted: input::= pseudocmd ([;] pseudocmd)* pseudocmd::= (white)* command (white)* white::= [space] command::= cmdname (pseudoparam)* | (white)* pseudoparam::= white (white)* param param ::= [alphanum] ([alphanum])* | ['] [alphanum] ([alphanum])* ['] Terminal symbol: [space] (space), [;] (commands delimiter), ['] (string delimiter], [alphanum] (others autorized characters)
Date: Date is a common representation for time in all the worlds. This has nothing to do with seconds, minutes, hours, days, weeks, months, seasons, years, decades, centuries, millenaries, eras, eons, etc. These notions suppose a planet with one sun, a week of 7 days, etc. Each world should provide its own Date converter. Date contains a timestamp given by the game clock at its creation. BE CAREFUL: java.util.Date and org.metacosm.framework.world.Date should not be mixed up.
StringKey: Class allowing better performance while remaining simple when using Strings as keys in a Map. The performance improvement can be up to twice as fast for the same amount of elements. This is achieved by caching the hash code of the String (which is usually compute each time in the default implementation of String). Based on Craig Larman's and Rhett Guthrie's Java 2: performance and idiom guide (Prentice Hall 2000).
AddRandomAbsoluteModifier: Add a random absolute modifier to an Influence. Syntax: add_ARM uniform [priority] uniform [priority] dice [priority] gaussian [priority]
DoubleProperty: A Property with a double value. TODO: min and max values can be stored in a memory-friendly way. They aren't stored as two long or double * values but as a special immutable Interval object (in fact a * reference to this object). A hashtable links (min, max) couples to IntervalManager objects, so for a given interval, only one Interval exists.
LongProperty: A Property with long value. TODO: min and max values can be stored in a memory-friendly way. They aren't stored as two long or double * values but as a special immutable Interval object (in fact a * reference to this object). A hashtable links (min, max) couples to IntervalManager objects, so for a given interval, only one Interval exists.
NonNumericProperty: A Non-numeric Property contains a non-numeric value (ie an non-null object). We couldn't find useful examples for using intersections, unions or exclusions of sets to define the field. So we'll only use one set (or none). The set should contain one or more values (i.e. a field is a non-null and non-empty set of distinct non-null Objects).
Property: Properties describe a particular aspect of an Entity. A Property is defined by a name and a value, which can be limited to some field. There are two main types of Properties: numeric ones and non-numeric ones. Note: we haven't found some useful example where a 'null' value could be useful, so 'null' value is tested against.
Influence: An Influence defines a Community of similar Entities and how being part this Community "influences" Entities that belongs to it. An Influence gathers Characteristics and other game constructs that are common to the Community of Entities it defines, thus modifying Entities it influences.
CommandsManager: Manages associations between commands name(s) and commands, both for PlayerCommands and ControllerCommands. Commands are loaded from two files (names given by Configuration). Used by the parser to find commands first, and then to execute them. It's a Singleton OOD pattern.
EventManager: EventManager provides a singleton around util.EventDispatcher on the server side. There should be only one EventManager, event with multiple game, maybe by using a game prefix before event type. This class should be responsible to load the event type tree.
AbsoluteModifier: An AbsoluteModifier affects a new value to a Property. The initial value doesn't care (it would be a RelativeModifier in this case). AbsoluteModifiers are applied by priority order (i.e. only the first max priority AbsoluteModifier is applied).
MCEventDispatcher: EventDispatcher should be able to route message to registered listeners according to the message type. Ideally, types should be ordered in a tree, to allow listeners to register simply to a whole family of message (not implemented yet)
RelativeModifier: A RelativeModifier modifies the value of a Property. It doesn't completly change it by affecting a new value (it would be an AbsoluteModifier in this case), but apply some operation on the current value to give the new one.
Bin2XML: Converts a binary serialized file into XML. There is no support for Block Data mode of serialization. There is no exhaustive tests on binary format: it is supposed to be correct. No support for JDK 1.3 modifications
RemoteEventLogger: An RemoteEventLogger can be created on an AdminConsoleConnection to forward all or some debug messages to the remote administration ui. Later should be extended to forward a subset of messages.
Field: A Field is a set of objects (values for a Property). It is a non-null and non-empty set of distinct non-null Objects). A Field is immutable. TODO: Is it useful to share Fields to spare memory?
Configuration: Provides all the configuration of the game, by reading the configuration file. All the public static final String are used to name parameters. It's also a Singleton OOD pattern.
Configuration: Provides all the configuration of the game, by reading the configuration file. All the public static final String are used to name parameters. It's also a Singleton OOD pattern.
RandomAbsoluteModifier: A RandomAbsoluteModifier is an AbsoluteModifier which value is not fixed or known at Influence creation time. The value is determined at Influence applying time with a DistributionLaw.
NewEntity: Creates an Entity. syntax: new_entity (place|item|creature) [place_id] If no place_id is given, current place entity's attribute is set to null. TODO Worlds management
IdServer: This class allocates Ids for Actions, Controllers and Entities. It doesn't retrieve them when Actions, Controllers or Entities no longer exist. 0 is not a legal Id.
Schedule: The scheduler for a Metacosm game. Use: Schedule schedule = new Schedule(this); // called by Game schedule.start(); ... schedule.stop();
AbstractQuest: Class AbstractQuest is for automatically generated quests, not for quests purposed by players. Quests are generated by AbstractQuestGenerator.
| Home | Contact Us | Privacy Policy | Terms of Service |