Page 1 of 1

To much Planning? *Solved*

Posted: Wed Aug 09, 2006 12:38 pm
by Karnage
Ok, so i've set up some planning for a CTF map.
The planning goes from the Republic CP to the CIS flag.
I clean, munge, play and the CPUs sit around on their butts.
The only time they come for the flag is when I have it!

What can I do to get them to move?

RE: To much Planning?

Posted: Wed Aug 09, 2006 3:58 pm
by Xavious
the only suggestion i have is to create more ways to get to the flag.

Posted: Wed Aug 09, 2006 6:59 pm
by Karnage
Ok, I created to ways for the Republic to get the flag, there are 20 units spawning on each team and they don't spawn at the beginning of the planning path but....

Image

This is what they do.

I need somebodies help with this, this is going to turn out to be a great map once I can get the planning figured out.

Posted: Thu Aug 10, 2006 12:23 am
by archer01
Things to note:
- Make sure all connections between hubs support the types of units you want to follow them (for you it seems you want soldier and hover turned on)
- Following that line of thought, make sure there is at least one legit "route" your units can take (can you draw a line along the connections from start to finish)
- Make sure you don't have any AI barriers intersecting your planning that might interfere with the path finding
- Make sure there is at least one connected hub near each spawn point

Now for the long ramble...

One other thing to remember that can't really be confirmed without seeing the game's source code:
- I'm assuming the "hub-connection" system they are using is very similar to the "RIP tables" concept used for computer-network routers. If that's the case the number of hubs won't affect the speed of the routing process too much (unless it does something extra I'm unaware of). Continuing this assumption, what will affect the speed (and even stability) of pathing is the distance and/or number of obstacles between any two given hubs.

Long story short... Make sure the hubs are an average distance apart (not too close, not too far) and make sure there aren't too many obstacles (barriers) in the middle of each connection. Example is below if you want to read it...

Example: AI unit Bob wants to get from hubA to hubB. It knows to use connection1 because of the planning data the mapper made, but now it needs to actually path-find along that connection. If there are too many barriers, or the distance is too far, it won't be able to find a clear path. After trying only a certain number of times it will give up, wait a few moments and try to path-find again. If the pathing keeps failing, the AI will just sit there seemingly doing nothing. It only tries a certain number of times to allow for speed of processing since AI path-finding is one of the biggest CPU wasters in gaming (why do you think so many games have terrible path-finding).

Again I just want to mention that this is all based on an assumtion and can't really be proven without the source code.

Hey [RDH]Zerted, if you read this could you confirm/denounce what I've written. You seem to know your way around the programming side of this game. Thanks.

Posted: Thu Aug 10, 2006 2:21 am
by Karnage
Well one of those worked, now they're moving. Thanks :D

Posted: Thu Aug 10, 2006 3:21 am
by [RDH]Zerted
No, I will not confirm/denounce what you've written. Reading the documentation is the only thing I have done with the AI paths and hubs.

I can comment that there are variables that deal with how close and how much damage a weapons shot does before the AI reacts to the shooter. I don't remember their names offhand, but I remember seeing them while skimming through the Luas.

Karnage, if you've solved your problem, please edit your first post and put "solved" (or something like that) in the title to let people with the same problem know, that they can look here for a possible solution. You don't have to, but its helpful to most people.