The DSIM Project







Home

What is DSIM ?

Screenshots

Download

Developpement

Contact






















Hosted by:
SourceForge
Logo




The AI motor

5.2) Entities are moving:
Remembering that you are an entity, you should undestands that moving an entity is exactly the same thing as moving yourself.
At first, the entity is older than the last lap: pnj->age++
If the entity is too old, and should die, we kill him:
if (pnj->age > espece_espvie[pnj->espece]) :compares his age and his species maximum age.
kill_pnj(pnj->id,map) :function used to kill an entity.
(we'll see it later)
Then, we look if the entity is pregnant... etc.. Then the entity moves randomly on the grid.
WHAAA would you say, randomly ??!!
Yes, in fact the first movement is made randomly, but we'll cancel some of this movement later.
- Previous - Next -





Copyright Dsim 2000/2001