Plan for Bruno
by Bruno · 06/27/2005 (7:31 am) · 11 comments
Here it goes, my first plan :)
I have been working heavily on AI lately, a game can be very pretty, and have the most advanced graphics around, but if the ai looks bad, the entire game experience is waisted.
On Vatan, i want to have the best AI i can make, i want enemies to listen to the player actions, to react to them, and to behave in squads when possible.
To implement this, i made a huge FSM, with more than 50 states, which was a pain to debug.
Anyways, to start bots navigate with a A* algorithm, nothing fancy here.
Each bot in a area, when alerted to the player presence will search for near "bot friends"., When found they all will join in a Squad structure.
What will this squad structure be good for, you ask ?
Well, when combat starts, the squad will try to flank the player, each bot will be aware of which direction each one has, so if one is moving to the right, the other will move to the left. In practice the player will have bots moving to his left and to his right.
Bots also "comunicate" between them, if in a squad of 3 bots while the player is moving one of the bots looses the line of sight to the player ( and registers the material occluding the player ) , this bot will "ask" to the other "Where is he" (voice acting here), and if one of the other 2 can see the player they will reply (with voice acting) depending on the material occluding the player (behind the tree, behind the rock, etc).
We can also trow rocks, bots will listen and investigate, we can sneak behind them and kill them with knifes, bots can open doors, etc.
I uploaded a small video showing off a combat situation between the player over here (divx required):
http://fysoftware.com/t_video/
Enjoy :)
I have been working heavily on AI lately, a game can be very pretty, and have the most advanced graphics around, but if the ai looks bad, the entire game experience is waisted.
On Vatan, i want to have the best AI i can make, i want enemies to listen to the player actions, to react to them, and to behave in squads when possible.
To implement this, i made a huge FSM, with more than 50 states, which was a pain to debug.
Anyways, to start bots navigate with a A* algorithm, nothing fancy here.
Each bot in a area, when alerted to the player presence will search for near "bot friends"., When found they all will join in a Squad structure.
What will this squad structure be good for, you ask ?
Well, when combat starts, the squad will try to flank the player, each bot will be aware of which direction each one has, so if one is moving to the right, the other will move to the left. In practice the player will have bots moving to his left and to his right.
Bots also "comunicate" between them, if in a squad of 3 bots while the player is moving one of the bots looses the line of sight to the player ( and registers the material occluding the player ) , this bot will "ask" to the other "Where is he" (voice acting here), and if one of the other 2 can see the player they will reply (with voice acting) depending on the material occluding the player (behind the tree, behind the rock, etc).
We can also trow rocks, bots will listen and investigate, we can sneak behind them and kill them with knifes, bots can open doors, etc.
I uploaded a small video showing off a combat situation between the player over here (divx required):
http://fysoftware.com/t_video/
Enjoy :)
#3
The nagivation map, is placed automatically in the map editor and nodes adjusted by hand in particular locations (bridges, etc)
06/27/2005 (1:32 pm)
Nope, not the Crytek engine.The nagivation map, is placed automatically in the map editor and nodes adjusted by hand in particular locations (bridges, etc)
#5
06/28/2005 (12:04 am)
Bruno, OMG what enginez is?? TSE yes / no? Plz check!!
#6
colud you please tell me a bout the technique you use to implement the navigation graph?
06/28/2005 (1:48 am)
Greate brunocolud you please tell me a bout the technique you use to implement the navigation graph?
#7
The navigation graph is pretty simple, in the map editor you just select the minimum distance between each node, and the minimum heigh\maximum height at where they can be placed, and it just generates a grid of nodes.
The nodes are all placed in the heightmap automatically.
Then manually, for particular situations, the mapper moves the nodes around.
When all the nodes are in the desirable locations, we press a button, and it generates the connections between all nodes(taking the minimum distance connection into account).
The beauty of this, is that, we can drop bots anywhere, and they will move correctly.
06/28/2005 (3:01 am)
No, not TSE, its a engine being developed inhouse.The navigation graph is pretty simple, in the map editor you just select the minimum distance between each node, and the minimum heigh\maximum height at where they can be placed, and it just generates a grid of nodes.
The nodes are all placed in the heightmap automatically.
Then manually, for particular situations, the mapper moves the nodes around.
When all the nodes are in the desirable locations, we press a button, and it generates the connections between all nodes(taking the minimum distance connection into account).
The beauty of this, is that, we can drop bots anywhere, and they will move correctly.
#8
but what about the destribution method you use in placing the nodes (actually i'm stuking in how to destribute the nodes) I mean by destribute the nodes placing it in the world, so colud you explain more please?
and what about interiors how you generate the navigation graph for them?
06/28/2005 (3:21 pm)
greate but what about the destribution method you use in placing the nodes (actually i'm stuking in how to destribute the nodes) I mean by destribute the nodes placing it in the world, so colud you explain more please?
and what about interiors how you generate the navigation graph for them?
#9
for(x=0; x
for(y=0; y
place_node(x,y);
something like that, with (x++) and (y++) depending on the distance you want between nodes.
Indoor is a bit diferent, the nodes are not placed automatically, but placed in the editor manually by the mapper.
The connection between them is also made by distance, and a ray is casted between each node to make sure theres a path between them.
06/29/2005 (4:31 am)
The distribution method is just afor(x=0; x
something like that, with (x++) and (y++) depending on the distance you want between nodes.
Indoor is a bit diferent, the nodes are not placed automatically, but placed in the editor manually by the mapper.
The connection between them is also made by distance, and a ray is casted between each node to make sure theres a path between them.
#10
ok my last question how did you draw a line between 2 nodes?
coz some guys use opengl to draw it, so if you use the same way, please tll me how did you do it?
did you make a new .cc file like for example navgraph.cc and call the opengl there? or what?
06/29/2005 (11:21 pm)
thanks bruno for helpok my last question how did you draw a line between 2 nodes?
coz some guys use opengl to draw it, so if you use the same way, please tll me how did you do it?
did you make a new .cc file like for example navgraph.cc and call the opengl there? or what?
#11
If you are asking how to render the line between 2 nodes, its just a opengl rendering call.,
glBegin(GL_TRIANGLES);
glVertex3f( origin[0], origin[1], origin[2]);
glVertex3f(destiny[0], destiny[1], destiny[2]);
glVertex3f( origin[0], origin[1], origin[2]);
glEnd();
You can also draw with lines if you want , with (GL_LINE)
06/30/2005 (2:53 pm)
I'm not sure about what you are asking., if you mean in what file in Torque i did the drawing, i didn't because i'm not using Torque.If you are asking how to render the line between 2 nodes, its just a opengl rendering call.,
glBegin(GL_TRIANGLES);
glVertex3f( origin[0], origin[1], origin[2]);
glVertex3f(destiny[0], destiny[1], destiny[2]);
glVertex3f( origin[0], origin[1], origin[2]);
glEnd();
You can also draw with lines if you want , with (GL_LINE)

Torque Owner Zachary Zadell