For testing i created very simple snail AI bot, that just randomly wanders.
Then i tried to test how many of those i can spawn on server and replicate.
The bad thing is that i can do only around 20-25 without noticeable lag. This is very bad news.
So any ideas how to put around 400 of those AI bots in level? Why 400, its because that is when my PC starts to choke with non replicated version, so i kind of want to eliminate soft cap from replication.
My first idea is to replicate only AI orders. For eg server manages all bots, gets random destination for new order, tells bot to go there.
And instead of replicating that bot movement, it replicates only event that gives order “go to [X,Y,Z]”, all snail bots on clients will got there on their own.
But before i rewrite half of AI code, did anybody try something like this? I am worried that in big crowd even slight difference to when event fired may give different outcomes, so clients will see wrong state of snail swarm.
Are ther some useful console commands to see what exactly eats up bandwith. I also suspect that this lag may be due to collision of snail to snail, or maybe navigation goes nuts with 30 of snails trying to find path. So console commands for seeing what is going on with navigation and how much collision costs would be great.