In the coming week Yuri and Andrei will explore the ‘light ownership’ of zombies on clients that we discussed in the last blog. The intention for this is to create zero latency for any nearby zombies directly chasing or attacking the player.
Work over the past seven days, meanwhile, has been a continuation on making sure that zombie movement transmission is as smooth as possible on clients – even with high levels of latency and extremely sparing transmission of positions. The endgame of all this being to minimize network traffic with hordes.
In Build 40 and earlier, when zombies move the server calculates their movement via the same AI routines the single-player uses. All positions, animation frames, angles etc are transmitted to clients that are in range of that zombie. Zombies only ever move on the server, so their movement is always inherently at a lower framerate than in SP.
On top of this, due to the latency and ping between server and client, by the time that information is received on a client it’s always out of date. The zombie will always be further along its path depending on the delay in the packet, what you (the client) see is inherently a representation of the past.
Finally, and most importantly when dealing with the zombie menace, if any lag occurs in causing lost packets or delays – then that has no bearing on the zombie’s AI. A bite can occur on the server without a single positional update ever reaching the client being bitten.
So let’s look at how the MP Strike Force have been looking to remedy this. In the following video the blue circles represent the zombies position on the server,while the green line and circle represent the zombies’ current target for movement.
(Please ignore some animation oddities when they transition from standing to chasing at the moment)
Look at the rarity of movement of the blue circles (especially on zombies far away from the player) – and also the inaccuracy as to where the client zombies are appearing. This shows that zombies on clients have a ton more agency to decide themselves how to move, instead of relying purely on information passed down to them by the server.
Zombies far from the player now have a second or more between updates from the server, instead of updates every server tick – which would have been something like 15 times every second. Despite this, zeds are able to move around convincingly using a combination of prediction, interpolation and extrapolation and leveraging the client zombie AI states for moving.
The end result of all this should be, for the most part, smooth zombie movement even in hordes and with high pings or server stress.
Will it be perfect? Well, clearly the differences between the blue circles and the zombies position shows that they are often in inaccurate places on the map – you can see them try to correct themselves as player positions get transmitted after delays and inform them that their predictive client-side shambling has been in the wrong direction. This is something that Yuri and Andrei will continue to improve upon, however ultimately these inconsistencies shouldn’t matter too much.
Once client ownership over zombies is in-place it will only be zombies at a distance and those not interacting with players on a certain client that would have these inconsistencies or deviations from their true server position. In these cases having believable approximate behaviour of the zombies that reasonably mirrors their actions will suffice. Having increased visual fidelity of their movement at an extremely low cost of network traffic, is much more important than extreme accuracy of position and direction of zeds that aren’t directly in harm’s way or chasing your own particular survivor.
Ownership of zombies that are of relevance to the player at hand will be transferred – so the client impacted by the zombie in gameplay terms will have zero latency authority over the zombies actions. This will mean then that their combat should hopefully be identical to that of the single player experience. This then, is one of our key next milestones.
There will undoubtedly be additional challenges ahead. For example, we have to make combat effective when attacking a zombie that’s chasing a friend.
That zombie will be at far higher risk of suffering from latency, and will be using client side prediction and cover-ups based on delayed information. Likewise, there’s the issue of making sure a remote player attacking a zombie that’s chasing you look believable with these similar latency issues.
However, whatever issues we face, even we find solutions that aren’t 100% perfect the end result will be VASTLY preferable to our current MP issues and frailties. The war on lag bites will hopefully have been won, and we will have seen the end of running through hordes of zombies that pause in sync every second as the server struggles to keep up.
NEXT IWBUMS BETA PATCH
We’re on track for a release for the next patch early next week, as we currently have a completed tutorial that industrious internal testers are doing their utmost to break – after which RJ cleans up their mess.
Other interesting nuggets that have gone into the patch this week include:
- Polished English language UI text from a new starring role from community member Faalagorn and Nasko.
- Ability to wash blood from cars.
- ‘Fill all’ option when filling up bottles of water etc.
- Better cutaway behaviour with fences
- A new ‘reloading’ radial menu
- Fannypacks and flip-flops
FINALLY AND IMPORTANTLY
It feels strange for the development blog of a zombie survival game to pass comment on the news of the day, but due to unfolding events it becomes imperative to underline:
Black lives matter.
We hope that in its own small way our game and community can, and will, reflect this basic fact and right.
This week’s rogue katana from Debugging Sucks. A changelist of all IWBUMS patches since the 41 beta was released can be found here. A general list of stuff added to PZ, and vids of features being worked on, is kept here – so you don’t have to plough through endless dev blogs for info. The Centralized Block of Italicised Text would like to direct your attention to the PZ Wiki should you feel like editing or amending something, and the PZ Mailing List that can send blogs like this and patch notes direct to your mailbox. We also live on Twitter right here! Our Discord is open for chat and hijinks too!