So I’m currently working on a space based RTS game, in which all moving units are space ships.
I’ve been looking in to different solutions for pathfinding and local avoidance, currently for pathfinding I’m using Aron Granberg’s A* package. I had talked to him about the local avoidance in the professional version, but he thinks it won’t work for rectangular ships.
And there lies my problems, in most RTS games units are characters that can use capsules. Whereas in mine units are ships which can be oblong and such.
I’m on a tight deadline, and I’m not sure I can completely code the local avoidance engine on my own in time, I was wondering if anyone had suggestions for pathing packages or steering packages that would work well in my case.
Question, will this be multiplayer oriented? If not, I would suggest checking out UnitySteer! Pretty sweet package, will take some playing to understand. To me, it feels a lot more natural.
http://forum.unity3d.com/threads/26217-UnitySteer-steering-library-for-Unity
You will have to hunt around for the newest version, I am a bit too lazy to look it up.
This will be multiplayer oriented, it has both a singleplayer and multiplayer mode.
I tried out UnitySteer, but it seemed to have a lot of troubles properly calculating avoidance for the ships.
Perhaps a way I could improve the results of UnitySteer would be to implement an influence map as well. Have the basic pathing be based off an influence map, then do some general steering for the immediate area.
Quick bit of advice for you. Don’t build the single player first, build multiplayer first. There are a lot of things that you are doing that won’t work in multiplayer
Multiplayer RTS is no simple task at all! So, again, I highly suggest you figure out the networking stuff first, as most of your code won’t be usable.
As for the steering, it won’t work in multiplayer the way it is built. It uses Unity’s physics to detect collisions. You can still use it, but you will need to make your own intersection testing algorithm that isn’t based on floating precision, and here is why:
http://gafferongames.com/networking-for-game-programmers/floating-point-determinism/
There is also a problem with the library with the wandering steering method, it uses a random. You need to ensure that you can replicate the results on all clients computers, which means everyone uses the same random initializer. Don’t use the Unity.Random, use system.random.
Make sure you read that. Once you realize that pretty much everything you do is based on floating point operations, you will understand that your approach at the moment won’t work.
As for doing it with an influence map, sure, that would work. You could also do a generic path-finding algorithm like the one you have, and then use steering to apply the natural feel to it.
And as for the problems of the avoidance algorithms, you need to increase the size of the “collidable object”, I ran into the same problem 