Lots of agents on a Recast graph; a bit stuck

Hi,

Might situation is a little out of the ordinary and I am a little stuck how to progress.

I am building a semi-open world game, about 3k x 3k in unity sizes. It is a multiplayer game, with around 50 players, and I have the basics in place. I am now adding the zombies. I want these to act more like left4dead zombies than the lumber WalkingDead types.

Due to bandwidth each zombie can not be a independent entity like the player is as I want 30+ on screen at once. To overcome this I have implemented a system of curves, as detailed by the planetary anihilation team. This basically means that I send the key points of the curve to the clients and the zombies just interpolate between these.

One problem this introduces is that the zombies have to follow the curves exactly so they are in the same position on the server and clients at all times, including for ‘later starters’ when loading the game.

This means that I can not use any form of RVO, as this can not be made predictable. So all my curves have to calculated up front. This is fine when my zombies first awake as they are spaced apart. However, as they get closer to the player and start pursuing them they bunch together and rather than a bunch of crazed zombies mobbing the player I get a comical conga of co-located zombies :slight_smile:

I am just wondering if there is any way I can make my zombies a little more realistic in terms of not using the same path, etc

I have merged in the cooperative logic from you experimental beta and this works, but you can not apply any modifiers when using this, and without a funnel modifier on the recast graph the movements are a little strange!

What I am trying to do might not be possible. I can post a video if that will help! ? But I know there are much smarter people out there than me that might have some ideas!

Sorry for the long read!!

Hi

Finding such non-overlapping curves for a non-trivial amount of time in the future is really hard. I would not recommend going for that route. And if you want the zombies to react to the players you have to re-send those curves pretty often anyway.

Synchronizing the position of 30 zombies from a master server doesn’t seem like it would be that bandwidth intensive. If you just sync a position + rotation + velocity + angular velocity that’s only something like 56 bytes (say 100 to add some margin). If you do this 5 times per second for 50 players you end up with outbound traffic of about 100 * 5 * 50 * 30 = 750000 bytes/s = 750 kb/s which is perfectly reasonable for a server. Compression can probably bring that down by a factor of 5 or 10.

Thanks for the response. I think you are right, I am never going to get behaviour I am happy with using curves. It has been fun implementing them, and I am sure I will have use for them at some point for something much less dynamic, but I will go back to more normal methods for the zombies for now. I appreciate the time you took to reply, it saves me from one more rabbit hole :smiley:

1 Like