Jump to content

Possible fix to a teleporting zeds issue

Recommended Posts

Posted (edited)

Let me start by quoting the last blog entry:


If player A) is being attacked by a zombie, and player B) then hits that zombie in the back. It’s very possible that player A and player B will disagree where that zombie is. However, now, the ‘truth’ is where player A) says it is.

player A is being attacked, so the zombie is player A’s zombie. player B) hits the zombie in the back (perhaps not being stood directly next to it since player B thinks the zombie is half a tile away). So the zombie turns around and attacks player B). Now in our current version, with the soft ownership, what would happen here? The zombie would teleport to where player A believed the zombie is, meaning it would teleport on player B)’s client, the player who tried to rescue his friend, and potentially teleport to their side and take a bite out of their neck. That’s broken and awful.

However, the new system will always choose the client that is targeted or influenced by the zombie as the ‘source of truth’. So player B’s ‘incorrect’ position for the zombie will now be considered ‘truth’, and player A in this circumstance would be the one to witness any teleporting. This doesn’t matter however, because player A is in no danger from the zombie, the small fade in / fade out position correction has zero chance of negatively impacting them or leading to them getting bitten.

So, my suggestion is to add a server issued timer for more predictable zombie agression switch.
I'll try to explain this with an example: zombie is attacking player A, player B hits that zombie and passes that info to the server, wich decides that zombie should now switch to player B. This is where the timer kick in. Basically server takes into account latency of all the players involved, and adds some extra time to it, just to make sure. Then, it tells all the players involved who's controling that zombie now and a precalculated time delay of when that happens. So, when zombie is going to switch for player B, all the clients around should already be aware, unless some unpredictable lag spike occured. It will make zombies a little retarded, but I believe it's fine, they're zombies after all. And it supposed to pretty much eleminate teleportation issue, except massive spike cases.
I'am not sure if I managed to make my point clear here, and I may have missed on some details of how the new net code works, but the idea should work eitherway.

Edited by GrIfFiN

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...