Posted by Turbo Pascal on July 11, 2000 at 12:01:24:
In reply to: New AI, Wow!!!!!!!!!!!!!!!!!! posted by Tomb Biker on July 11, 2000 at 06:34:12:
:Now my question: Could you do some explanation on how the AI worx? Maybe this could be
:interesting for the Rosetta Stone. Would be great!
Hi Biker, how are you?,
I am be glad to know that you did't had problems re-building
the "Fenician Temple".
I am sure that Mister Roseta Stone already know how AI work, is just
he did't put examples and sometimes his explanation are too general,
I finally learn how the AI need to be constructed first using what
Roy teached me, then reading again, again...and again the roseta document, then
i did some guest and test.
Maybe this forum is not the right place to put the whole explanation
for the AI, i will do in the manual that i am wrinting but this is some
interesting info not mentioned well in roseta document.
*The Box structure is for tell to the enemies where are the
solid in the room, the animals only can climb to box lowers that 256 units
heights. (well most at all)
*The overlap structure is for tell to the enemies if the neighbor box is
accesible.
*The zones structure is used for Indentify at what group a box belong to.
What i did is:
-I build a box for each tile sector in the room, except for tiles where is wall or
where is colisional portals to the room below.
The dimension and position for those box are calculated in world cordinates
from each tile.
The heigh for each box is calculated reading the floor height, translate it from
-128 to 128 range to 0-255 range, then multiply for 128.
- Each box can only have a maximun of 4 neighbor, at front/back/left/right,
read the neighbors info and compare the floors heighs and if the diference
is lower that 256 then add the neighbor to the overlap list.
- Add a new entrie zone for each box, and just assing the ground zone and
fly zone with the same number, (i mean there is just one group for all boxes).
I am just using one Zone, this mean that enemies "See" Lara wherever she
is and the animals can go to any place; adding more zones mean that when Lara stay in
a different zone the enemies can't see her and they prefers stay in the zone
where they currently are.
Will be great to use a "Zone Editor" similar to the box layout editor from ROY tritem,
maybe i will code the program when i have time. (or maybe Roy want to include it :-)).
See you.
Turbo Pascal