Skip to content
dankrusi edited this page Apr 4, 2012 · 2 revisions

World

The world is made up of empty space, lifelets, and food. In addition, the world contains audible messages.

The boundary of the world is circular and is defined by the radius Config.WorldRadius. The world has a two-dimensional Cartesian coordinate system with the center being 0,0.

Lifelet

Each race is made up of one or more lifelets. A lifelet has the following main mutable properties:

Age

Lifelets are serially simulated one time-step at a time, in which its age increases by one.

Position

The position of each lifelet is re-calculated upon each simulation step based upon its current velocity. Each lifelet can only change its position once per simulation step.

A lifelet may not go beyond the world boundaries.

Velocity

The lifelets velocity determines the heading and speed of the lifelet.

The velocity is capped if the velocity vector normal is greater than Config.LifeletMaximumVelocityRequest.

Health

Each lifelet has an initial health of Config.LifeletInitialHealth. If the health drops below 0, the lifelet dies.

A natural health decrement of Config.LifeletNaturalHealthDecrement exists.

If the lifelets energy is below Config.LifeletLowEnergyHealthBounds, the health additionally decrements at Config.LifeletLowEnergyHealthDecrement.

Health can additionally be decreased from external attacks.

Energy

Each lifelet has an initial energy of Config.LifeletInitialEnergy.

A natural energy decrement of Config.LifeletNaturalEnergyDecrement exists.

If the lifelets energy is low, it may not be able to move or perform other actions.

Actions and Events

Birth

Upon birth, the lifelet is randomly placed on the world in a cluster of its race.

Movement

Movement is achieved by requesting a change in velocity. Each translation of position costs an amount of energy based on how fast it moves. The lifelet must have the required energy in order to make a move. Only a single movement per simulation step is possible, however a lifelets requested velocity can be changed several times per simulation step.

Talking

Audible messages composed of single characters of the language Config.MessageLanguage can be produced by any lifelet. Depending on the lifelets energy, the message will propagate further or less.

When a message is broadcasted, it moves through space from its origin at Config.MessageAgeToRadiusRatio. A message is no longer audible after a maximum age of Config.MessageMaxAge +/- Config.MessageMaxAgeJitter.

Only one message per Config.LifeletMinimumTalkDelay simulation steps are allowed per lifelet.

Giving

Any lifelet may give any other lifelet energy, given that it itself has the energy. When giving energy, there is a tax of Config.TODO.

A lifelet may only give once per Config.LifeletMinimumGiveEnergyDelay simulation steps.

Attacking

Any lifelet may attac any other lifelet when within the attack range Config.LifeletMaximumAttackRange. Attacking requires energy, and the attacking lifelet must have the available energy in order to attack. When attacking, there is a energy tax of Config.TODO.

A lifelet may only attack once per Config.LifeletMinimumAttackDelay simulation steps.

Death

Upon death, the lifelet leaves behind a piece of food. The energy contained in the food is determined by its energy at the moment of death.