271
edits
Line 8: | Line 8: | ||
==Pathfinding and movement - "I think I will consult a map for a while..."== | ==Pathfinding and movement - "I think I will consult a map for a while..."== | ||
[[File:Pathfinding grid.JPG|thumb|right|alt=Example of a pathfinding grid.|An example of a pathfinding grid.]] | [[File:Pathfinding grid.JPG|thumb|right|alt=Example of a pathfinding grid.|An example of a pathfinding grid.]] | ||
[[File:Ai2 showastar2.png|thumb|right|alt=Example of an A*.|An example of the A* algorithm's work: nodes chosen as a path for A.I. are highlighted.]] | |||
Oni A.I. has two ways how to make A.I. move in a game world - pathfinding-based and ???vector-based??? (needs proper term). | Oni A.I. has two ways how to make A.I. move in a game world - pathfinding-based and ???vector-based??? (needs proper term). | ||
Line 44: | Line 45: | ||
'''Unexpected Collision''' movement happens when A.I. runs on its own towards some destination and suddenly hits an obstacle. Ideally that should never happen as pathfinding grid should prevent it, but still...Anyway, when collision happens, the game decides what to do according to actually selected way how to move a character: | '''Unexpected Collision''' movement happens when A.I. runs on its own towards some destination and suddenly hits an obstacle. Ideally that should never happen as pathfinding grid should prevent it, but still...Anyway, when collision happens, the game decides what to do according to actually selected way how to move a character: | ||
:*Pathfinding - the game makes A.I. do a few steps back, rotate a bit and lets the A.I. continue its journey. There is limit of how many unexpected collisions can A.I. undergo before it gives up its destination as unreachable. | :*Pathfinding - the game makes A.I. do a few steps back, rotate a bit and lets the A.I. continue its journey. There is limit of how many unexpected collisions can A.I. undergo before it gives up its destination as unreachable. | ||
:*???Vector??? - according to the angle between A.I.'s facing and obstacle the game decides either to let the character slide along the obstacle or to stop the character completely until direction of the A.I.'s vector of movement changes. | :*???Vector??? - according to the angle between A.I.'s facing and obstacle the game decides either to let the character slide along the obstacle or to stop the character completely until direction of the A.I.'s vector of movement changes. | ||
==Congitive possiblities of A.I. characters ... "COME TO YOUR SENSES!"== | ==Congitive possiblities of A.I. characters ... "COME TO YOUR SENSES!"== |
edits