-
23rd April 2012, 03:47 PM
#11
The AI question is an interesting one. Both Zero and myself have similar node based systems and from my experiments at least its not simple to add an avoidance system:
1: The ships are ALWAYS pointing toward a node- this means that if a ship sideshifts it (the ship) will swing out and it looks a bit strange. If this happens too close to a node the ship might even miss the node and double back on itself to pass the missed node, or the sideshift angle is too wide and the ship looses speed as its pointing the wrong way.
Another way would involve switching off the navigation quickly to dodge and then re-engage it, but again you have the problem of missing a node.
This can be solved by making the distance trigger of the node (i.e. a ship needs to be within this range to trigger it has 'passed' it) larger. This makes pathfinding slightly sloppier though, as the node path is not followed closely.
Also, if you are using linear velocities to sideshift an move forwards, you are mixing vectors which sometimes have unforseen interactions.
2: It would need a few rays to get working: one to detect the obstacle, and another (plus logic) to check the space the ship is moving into is empty. For those with i7s or quad cores ( hee hee
) this is not much of a problem, but for low end CPUs this is an extra thing to do.
These things are not impossible to solve, but they highlight the limitations of node based navigation.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules