ObjectArchitecture

From Los Talleres de Linux
Revision as of 07:03, 14 February 2010 by Vicm3 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Entity[edit]

All entities have a StateChange method which is nested, meaning that if an entity is composed of a nonempty set of entities, then its StateChange method is merely the iteration of the StateChange methods of its components over the whole set of its components. Thus it need only be defined for terminal nodes via a special method outside the API which must be overidden. The StateChange method must then first check if there are components, and if there are, call their methods recursively, if there are not, it must check if the special method is overidden, if it is, call it, if it is not, then exit gracefully doing nothing.

Internal Entity[edit]

Phenotype[edit]

The PhysicalCharacteristics of the Creature, a sequence of modules, each containing a characteristic, preferably scalar.

Genotype[edit]

The genes of the creature, a sequence of modules, each containing a GeneticWord plus some information regarding its expression.

Spatial Entity[edit]

Space[edit]

This class should hold as components the space itself or ground and all the creatures that inhabit it.

Maybe in the future it should be split into two classes: one for the ground, to be instantiated as a component the world; and one for the world, which would be this one we are now calling space.

Creature[edit]

A creature is an inhabitant of this PicoWorld. It is composed of a Phenotype and a Genotype.

Module[edit]

All the actual modules are also Internal Entities, and they are components of either the Phenotype or the Genotype.

Core[edit]

Energy[edit]

This is a Phenotype module.

The energy module represents food, oxygen, sunlight, and anything else that might give energy to a creature. To keep the architecture simple, I think, at least for now, it should also represent water and all other structural substances a creature might need.

We might call mana this mythical substance that provides everything.

Mana should only be affected by four operations:

  1. Creatures that die, leave their mana on the spot where they die.
  2. Cratures that find mana on the ground may eat it.
  3. Cratures that procreate have to transfer a certain amount to their offspring.
  4. In a fight only one creature may be left standing, and it eats the mana of the dead.

Thus, so far, mana is conserved, later the architecture may be amended to include mana sinks and fountains.

Plug in

None so far

This is where you come in, edit this page and create YourOwn PluginModule.

Sugerencia sobre le energía --2004/07/21 01:51 CST
Si una de las criaturas huye de una pelea ambas perderán algo de mana y así se podría representar una interacción negativa para ambas.