The DSIM Project







Home

What is DSIM ?

Screenshots

Download

Developpement

Contact






















Hosted by:
SourceForge
Logo




The AI motor

2) Creating ourself:
If you want to interact with the entities, one of the best solution is to be one of them.
nombre_pnj = NB_PNJ_START; defines the number of fisrt generation entities.
pnj_tab=(struct _perso **) malloc(nombre_pnj*sizeof(struct _perso*)); creates the array, wich will contain datas about each entity.
creation_perso(map) creates ourself.

In this function, we uses for the first time the structure struct _perso;
This structure stores all informations about one entity: sex, name, age,...
pnj_tab contains pointers to this type of structure.
creation_perso initialises some of our characteristics from the species general characteristics (eg: sociability), or askes for others (eg: name).
add_pos(0); references our position on the map.
So our position is known by the map (in the substructure _lieu).

mode_master=1; is very important.
This variable will allow you or not to interact with the entities.
(no by default)
By setting it to 0, you will be considered by the program as an entity, so you might be pregnant if you are a female, etc...
And that's all, you exists !
- Previous - Next -





Copyright Dsim 2000/2001