Jump to content

Stale zombies


Modin

Recommended Posts

Hello devs,

 

There would appear to be a specific error that causes a server to stop acknowledging zombies for a long enough time (more than 5 seconds) to cause the clients to stop simulating said zombies, and remove them. When that happens, the message "removing stale zombie 5000 id=(id)" appears clientside. Kiting groups of zombies over a certain distance seems to increase the likelihood of this happening.

 

An odd thing is, these zombies remain inactive as long as players are nearby, but if all players leave the chunk and then come back, they will reactivate, as if they'd never left.

 

This issue would seem to happen no matter what, but be compounded, and as such much more visible, when using the no-culling mod that stops zombies from being culled (no more 500 zombies limit), possibly because there are many more zombies for it to trigger, or maybe because the strain on the server is much greater.

 

I am most curious about what could possibly cause the server to stop acknowledging zombies.

 

To reproduce, play MP normally and watch the error log for "stale zombie 5000" messages. When this happens, you should have seen one or more zombies disappear. If you leave and come back, they will reappear. To increase the chances of this triggering, draw a greater amount of zombies and kite them over a distance of one chunk or more. To further increase the chances, remove the 500 zombie limit (not necessary).

 

[EDIT: striked out sentence is false, the messages do not always result in noticeable disappearances in-game. In fact, they seldom do. They noticeably do when you drag zombies over a long distance. Otherwise, the disappearances happen out of sight. They still happen, however, and the zombies are put in a "paused" or "stalled" state where they wait for players to go away until reactivating. The underlined reason seems to be the correct one: no culling = more zombies = more such messages, it would appear to be a numbers game.]

Edited by Modin
Link to comment
Share on other sites

Hey again,

 

The issue is 100% reproducible by doing this: 

 

 

Here is the log of when the disappearances happened: VMiqcLi.png

 

Load up a new server, round up some zombies, kite them for a couple minutes, watch them all disappear. The logs say "removing stale zombie 5000".

 

In that example run, there were no other stale zombie removals that I can see. It was only at the end of the kiting. This was with culling still active.

 

Without culling active, the messages show up every few seconds, even without kiting any zombies around. It would appear to be deleting lots of zombies somewhere out of vision. I am unsure what link there is between the two instances of stale zombies.

Link to comment
Share on other sites

As said previously, this is from breaking sync when you disabled the zombie optimizer and overloading the server with zombies.

You have 21k. Well past the 500 zombies cutoff due to using the mod and well past the point that the game can reliably update the number of zombies you have.

 

We can't help with problems caused by mods.

Link to comment
Share on other sites

Again, the stale removal error has nothing to do with any mod. It happens with the base unmodified game.

 

I was running the base unmodified game in that vid. You can see some zombies getting culled.

 

No matter, I made a second video with the entire process visible, and if you need anything more, then just tell me:

 

 

 

4 batches of stale removal

 

1st removal:

 

vezhneL.png

 

2nd removal:

 

iSwNa25.png

 

3rd and 4th removals:

 

8Hw6EOd.png

 

It would appear, btw, that zombie ids are not directly related to culling-relevant zombie count. I don't know that there were or were not 21k zombies in the first vid, and 9-10k in this one. I couldn't see any culling happening on-screen in the 2nd vid, at least.

 

Finally, I neglected to showcase this but know that, had I backtracked to previous sites of disappearance (if they were far enough away), the "stale" zombies would've freshened back up and been active again as if nothing happened, only to go stale again if dragged over a sufficiently long distance once more.

 

 

 

This is off-topic, but @EnigmaGrey there are no desync issues with the mod that I can see. There can't be when you're all alone on the server and the server does not care about the culling algorithm (does not use it, and if it used it, it would use the modded file anyway) - there should be no disagreements anywhere: there is nobody else to disagree with (again if the server ran its own culling check, it would agree: it has the same files as the clients). I tested this myself: separate server with its own files, whether the server is modded or not makes no difference as to what happens in-game and what errors are logged.

 

When there is another client to disagree with: one with the mod, another without, there are no issues. No invisible zombies, no weirdness, not one player seeing something the other can't. It all stays perfectly synched between them. They see the same "stale" zombies go "durr" then "poof", they are attacked by and kill the same zombies, everything is consistent. Only this "stale" zombie problem is compounded for some reason that I'd very much like to figure out hence my interest in this report.

 

When I mean "compounded" by the way I mean that, with no mod, stales happen when dragged over a sufficient distance. The log is not spammed by stale removals if one does not drag zombies over a great distance. With the mod, the log is almost constantly spammed by these, even without dragging zombies, and on top of this of course stales happen when dragging. The world is still filled with a healthy amount of zombies but it does feel as if some of them are disappearing, and then reappearing when the player goes far enough away and then back. This creates a sort of inconsistency which, added up with migration and meta-events. makes it hard to track zombie movement.

 

[EDIT: I was wrong, the log is spammed by stale removals without the mod too. The mod just increases the amount of zombies, and such, the amount of removals. It would appear to be a simple numbers game.]

Edited by Modin
Link to comment
Share on other sites

To further understand this issue, I decided to run a default vanilla server with no mods whatsoever and try to play semi-normally for an hour, but also trying to stress the server a bit. I wanted to see if there could be non-distance related stales happening.

 

I avoided dragging zombies as much as possible so as to not see any stales. I don't think I ever caused any zombie to be dragged over a sufficiently long distance. Meta-events, honking and gunshots should be the only causes. I didn't see any zombie stalling myself.

 

Here are the results:

I had my first stale as I was fighting zombies around a fence. I had ran around but had made sure not to drag any zombie far, utilizing line of sight. There was no shouting, no loud sounds, no meta events that I could hear.

 

PPlMksf.png

 

Then, very shortly after, as I was looting a house, without having encountered any group or made any sound, I had a batch of removals:

 

uLGvqW1.png

 

I saw several more stales over a few more minutes of staying put:

 

OMcgIn7.png

 

Note that I did not notice any zombies disappearing.

 

After a dozen minutes of running around and causing a ruckus and only seeing one stale disappearance in the logs (29635), I sat still in a room and noticed another batch of removals. (note that I always dragged the zombies over very short distances)

 

wGZh5Dy.png

 

Finally I went out in the streets and shot some 50 shells into groups before running away and ending the experiment. In that time I did not see a single stale, however, when coming back out after having drawn many zombies around, I noticed there were significantly less - whether they were removed by culling or stalling, I do not know, but they certainly didn't wander away (I only waited inside for a couple minutes).

 

In conclusion, I did see a lot of seemingly random stales in the logs with no apparent cause, but did not notice any disappearances in-game. It would seem that there are 2 types of stales: "organic" ones that just happen during normal gameplay and happen out of sight, and "artificial" ones that are forced through dragging zombies around.

 

The second obviously breaks immersion as zombies cannot follow you for very long without disappearing, and the first, while invisible, does have an effect on gameplay as it makes zombies non-persistent, which further serves to break immersion. For example in my game, I could draw a number of zombies around, lose them around a corner, stay inside, and when coming out, most of them were gone.

 

Most importantly, stalled zombies, unlike culled ones, stay active and come back to life once the player wanders far enough away. This can cause even more inconsistency with zombie movement/positions, since what the player thought was a safe zone is in fact infested with invisible, stalled zombies that are just waiting for reactivation.

 

Note that all tests here were realized with the same settings as the 2nd video - apocalypse default settings on a vanilla unmodded server, in west point.

Link to comment
Share on other sites

It's very immersion breaking and once you know about it, it's such an exploitable system. Every fight I take in MP I know that eventually they will vanish. I can rest and eat, or just flat out leave. I assume this is being done for stability, which is fine, but it having large chunks of active zombies you're engaged with vanishing, it just kills the mood.

 

I've seen it happen before ever hitting that 5,000 number. I've seen it happen on a pure vanilla apoc server too. There just seems like there is something wrong with the logic with the code where it would just pluck active zombies from you.

 

I find PZ to be an immensely immersive game. It brings a level of reality I haven't gotten out of game before. This is why I think we're both just so passionate about being able to remove something to us is immensely immersion breaking.

Link to comment
Share on other sites

@EnigmaGrey Bit off-topic again but could you kindly re-open this report, please?

 

As I mention in the report, the error is present whether the no-culling mod is used or not. That mod once again has nothing to do with it. It was my mistake to even mention it.

 

What the no-culling mod changes and the only reason I mention it, is that without it (with a vanilla, unmodified game) the errors show up on the server's logs. With it, the errors show up on the clients' logs.

 

I would also appreciate it very much if you could take a bit more time to read my posts in their entirety. It looks very much like you're skimming though them, overlooking important information, and misunderstanding them.

 

I don't mind re-opening a report myself if needed. I hope I haven't offended you in any way.

Link to comment
Share on other sites

Did you delete the class and properly reverify the server and game for anyone on your server also using the mod?

Because realistically, we've not had reports of this until very recently, all from people using the mod, so to say the least I am extremely doubtful it's the base game doing it. And, if it's happening because you're just trying to force insane zombies on the server, the answer is to "turn it back to normal."

Link to comment
Share on other sites

5 hours ago, EnigmaGrey said:

Did you delete the class and properly reverify the server and game for anyone on your server also using the mod?

Because realistically, we've not had reports of this until very recently, all from people using the mod, so to say the least I am extremely doubtful it's the base game doing it. And, if it's happening because you're just trying to force insane zombies on the server, the answer is to "turn it back to normal."

 

Hey I want to join in, someone on reddit made me look into the issue a bit.

I've never installed those behavior changing mods, i've only runned small mods before. I tested it myself by hosting the server and playing on it. In short : it happens on vanilla don't try to blame the user for it. (Even though there's always been bad user reporting, you should not say that it's the user fault that actively (i'm a dev myself).)

I've had the issue happens to me by playing on default server rules, without any mods, just shout once or twice in a city and move a bit and you'll see zombie despawning. It seems to happens most likely when they're quite a few of them (not saying a hundred or more, juste few dozen is enough)
Note : I was actively trying to check how it happens, on normal gameplay i'd have gone away, or would have avoided having that much, or would have fought them (so the issue would have happened but I wouldn't notice it).

In regular gameplay it actually happened from times to times when playing with a very short list of mods such as "Unclear moodles" and few others (nothing that change items or anything). The most regular version of the despawning for me is freshly killed zombie that gets removed. It happens few time by game session (host hasn't port-forwarded, so it goes through the steam thing), when several player are around killing a group of zombies.

From the videos and what I understand I guess it's most likely caused by zombies being desynced between the player and the server. Once the zombie stop following the player, I believe the player doesn't "own the zombie" locally anymore (am I wrong ?), and the remote server doesn't update it because for the server the zombie shouldn't actually be there. I might be quite wrong about it but I don't know why it'd happen otherwise.

Link to comment
Share on other sites

The server runs its own zombie sim and is responsible for syncing the clients regardless of whether the cull list is generated on the client or the server. The cull list is then sent to the server, server purges those sim’d zombies, then sends updates to the relevant client. The mod introduces the possibility clients with and without the mod to therefore disagree. It is then possible that too many zombies pile up to be synced in time, being stale. (All the message means is it didn’t get updated after 5 seconds, so is no longer valid.)
 

Any individual user with the mod can break it. You do not personally have to run the mod, Fadoli.

 

 You can tell culling isn’t working due to the volume of zombies in the vid first vid, imo.

 

I can quickly see if it’s possible to provoke it by leading zombies in an infinite kongaline and never looking away so that they either pile up to an indefinite amount or can only be removed after falling well outside the visible area, but then we’re talking about an edge case + a diagnostic message that doesn’t matter in the second case, should there be no real affects vs what’s suddenly being reported frequently in relation to the mod.

Link to comment
Share on other sites

  @EnigmaGrey I've had the issue with friends I know don't have the mod installed, also running locally on my own server, never had the mod installed and was alone on it.

So the bug exist in plain vanilla. the other mod might make it worse. What I'm telling is that it happens on my vanilla install as well and it take 2 minutes to replicate, right now I'm in a middle of a game with my friend and one of them got a horde who have been removed out of thin air because of that (he was shooting with gun and attracted zombie on a fairly big distance). It definitively CAN impact gameplay, and it CAN be exploited to survive big hordes chasing you (which is not an issue with me playing with my friend but could impact gameplay on big multiplayer servers)

If you want me to do a 100% vanilla video of the bug (with just few zombies
) let me know.

Sorry if i have been somewhat rude on my first message that's not the goal, I would love to help the game improve.

Link to comment
Share on other sites

13 hours ago, EnigmaGrey said:

Did you delete the class and properly reverify the server and game for anyone on your server also using the mod?

Because realistically, we've not had reports of this until very recently, all from people using the mod, so to say the least I am extremely doubtful it's the base game doing it. And, if it's happening because you're just trying to force insane zombies on the server, the answer is to "turn it back to normal."

 

 

Yes of course I verified and reverified. I'd very much appreciate if some trust were thrown my way. I've spent several hours testing this over the last few days. I do believe I know what I'm talking about and I've got my head on my shoulders. You can verify yourself anyway. Look at the videos. There are very few zombies, they're all getting culled.

 

The reason you're seeing more reports now is because, with culling out of the way thanks to the mod, and people now more aware of the issue (and interested in having as few disappearances as possible), stale zombies have become more obvious to us, the players. After all, the mod has removed the cause for ~99% of disappearances. It's only logical that the cause for the remaining 1% would now become much more obvious while before it was invisible.

 

As you can see in the videos, it is happening because I'm herding zombies over some distance. It has now come to my attention that stalled zombies (meaning, zombies that disappear like in my vids) will reappear and reactivate whenever another player comes close (when the stalled zombies enter another player's reality bubble). This means that if I'd stuck around the site of disappearance, and another player had approached my position, the zombies would've popped back into existence right next to me.

 

@fadoli03 I think this might happen because of distance and not because of zombie count. In fact, it might be possible to make an empty server, spawn just one zombie, drag it some distance and see it stall. I'm not sure though, it would have to be tested.

 

As far as I understand, stale zombies are zombies that the server has stopped updating for more than 5s. Apparently according to your findings, the server updates a zombie every 4s if it's simulated by 1 client, and every 0.2s if it's simulated by 2 or more, so it should theoretically never happen that a zombie is not updated. Obviously something else is causing the server to stop updating these zombies - that's for the devs to know. What I'm pointing out is that it's an issue that affects gameplay.

 

5 hours ago, EnigmaGrey said:

The server runs its own zombie sim

 

I thought that the server doesn't do that anymore? You guys told us how you reworked your implementation of multiplayer so that the server doesn't have to simulate each and every zombie anymore, but rather delegates that weight to the clients, which in turn are kept in agreement with each other by the server whose job is now to decide which client is the authority owner of a zombie. So I'm very confused.

 

5 hours ago, EnigmaGrey said:

regardless of whether the cull list is generated on the client or the server

 

Can we get a definitive answer from someone who knows for sure? My intuition, honed by hours of testing, tells me the server does not decide anything about culling. Only the clients do. I can say that it does not matter whether the server is modded with the anti-culling fix or not, Nothing changes. And I can say that the anti-culling mod causes absolutely no desynching problem. Again, this stale zombie thing is a vanilla problem, the mod has nothing to do with it.

 

5 hours ago, EnigmaGrey said:

The mod introduces the possibility clients with and without the mod to therefore disagree

 

For sure. Now, in practice, in all my tests, in all reports of everyone playing MP with the mod, nobody ever sees any suspicious activity. And I know I'm repeating myself here, but the stale zombie problem is not caused by the mod, it is present in the base, unmodded game.

 

5 hours ago, EnigmaGrey said:

It is then possible that too many zombies pile up to be synced in time, being stale

 

This is not what is happening. Stale zombies are a problem with, or without a modded client. With, or without a modded server. With only 1 client connected to the server, or more. With inordinate amounts of zombies around, or with a regular apocalypse game with culling in play.

 

5 hours ago, EnigmaGrey said:

 You can tell culling isn’t working due to the volume of zombies in the vid first vid, imo.

 

 

You might have not played the game, or tested this enough. Culling is active in both of my videos. The volume of zombies is very low. Not even 100 are chasing me. For comparison, this is what the game looks without culling:

 

ISyrcKn.jpeg

 

2nd example:

 

a9tp4Og.jpeg

 

Look at the videos again.

5 hours ago, EnigmaGrey said:

I can quickly see if it’s possible to provoke it by leading zombies in an infinite kongaline and never looking away so that they either pile up to an indefinite amount or can only be removed after falling well outside the visible area, but then we’re talking about an edge case

 

I think I've made it clear that there is culling in the 2 tests on video here, so moving on: you can clearly see me looking away to run. In fact, with my extensive experience testing culling, I can say culling can and will happen in these situations. You don't need to look away for more than a second for it to take effect. It didn't, in the video, on the groups chasing me. Good! It means culling is for once working correctly, mainly due to the low amount of zombies around. However, in the 1st video you can see it delete a couple of zombies at the end of the trail.

 

This is to say, it is no edge case. It is happening consistently for anyone dragging zombies around on a multiplayer server. Obviously, I am doing so on purpose in my vids to showcase reproducibility, but of course I, and many other players, are organically dragging zombies over such distances while playing normally, and our experience is suffering from these disappearances. House alarms are enough to trigger this bug, for example. Players have been posting videos of weird behavior with zombies that stop moving, and disappear. In fact, it was already something I had witnessed before I even released the anti-culling modded file. I just didn't know better and thought it was part of culling.

 

The diagnostic message might not matter (although I will be investigating more, to make sure it does not). The dragging zombies around, does for sure.

 

I've debated enough about this and this will be my last post addressing this undue skepticism. I'd rather spend my time working on a solution.

Edited by Modin
Link to comment
Share on other sites

I did suggest lowering the zombie population to normal values. If you push it, you will break it. Those screenshots without culling look pretty overloaded, but maybe it's just random chance for those areas? Either way:

 

The short end of the stick is if people only notice stale zombies because they broke the game using a mod that intentionally breaks part of the game and that allowed them to find a way to provoke the vanilla game to also break, then it's not exactly much of a problem, is it? We're a year out from release now and aside from one post in July (caused by a mod that changed zombie settings ... somehow), any other reports have stemmed from the people involved with the mod. So, I'm going to assume it's related to the mod, aren't I?

 

I'm not just pulling this out of my ass.  I was there when this stuff was put into the game, tested it, and I have access to the code and people who wrote it to double-check with and have done so while expressing that we'd likely look at culling again in 42. Til then, it's not getting touched. That means I'm also the only one actually interested in this.


You guys seem to have a strong desire to have as many zombies as possible, no matter what, at any cost, and you have broken things before to get 'em? So I'm certainly going to be skeptical of whatever comes out of it, especially when it's been over a year since this released and most of the reports come from people using the mod (and now one other person who's just baffled they're getting the message). Why wouldn't I be? :| 

Link to comment
Share on other sites

I'm gonna say it happens, it happens casually with no mods, on an unmoded server, even when i'm running it locally and i've generated it fresh with all standards settings. It's most noticeable if you try to get it to happen.

I've NEVER installed the culling zombie mod on my computer, nor moded any of the java files (I do work on lua addon and have few installed NOT activated in the tests).

I've double checked, and my zombie generation is set to NORMAL (meaning it should not have to much zombie)

I've made a video published it on my very old youtube account as unlisted, i haven't cut it, and you can hear some clicks and cat noise because I forgot to disable the mic during the recording.
Anyway you can look at it from that timing : I drag the zombies on some distances and some get desynced and disappeared
 



They start getting unsynced at 5:40 and by 5:50 they disappeared (4 of them). I haven't tried hard and i'm actually bad at having the bug happen.
And it actually happened massively yesturday during the game session I had with my friend (I wasn't there, one of my friend had it while shooting at zombies) and NONE of us have moded the game files (though we do have very few mods that should not change zombies)
 

bug_paint.png

Link to comment
Share on other sites

18 hours ago, fadoli03 said:

I'm gonna say it happens, it happens casually with no mods, on an unmoded server, even when i'm running it locally and i've generated it fresh with all standards settings. It's most noticeable if you try to get it to happen.

I've NEVER installed the culling zombie mod on my computer, nor moded any of the java files (I do work on lua addon and have few installed NOT activated in the tests).

I've double checked, and my zombie generation is set to NORMAL (meaning it should not have to much zombie)

I've made a video published it on my very old youtube account as unlisted, i haven't cut it, and you can hear some clicks and cat noise because I forgot to disable the mic during the recording.
Anyway you can look at it from that timing : I drag the zombies on some distances and some get desynced and disappeared
 



They start getting unsynced at 5:40 and by 5:50 they disappeared (4 of them). I haven't tried hard and i'm actually bad at having the bug happen.
And it actually happened massively yesturday during the game session I had with my friend (I wasn't there, one of my friend had it while shooting at zombies) and NONE of us have moded the game files (though we do have very few mods that should not change zombies)
 

bug_paint.png

Understood, Fadoli. Just please note that for now I consider your issue separate from Modin's, even if it's similar in nature.

 

Could you grab your log so we can see if it differs from Modin's screenshots of theirs or not? It'd be quite helpful to see if what I'm assuming is abnormal actually is "normal" even without the mod or not. They're stored in %UserProfile%\zomboid\logs and are sorted into folders by date. If you remember the day/time of the worst example, it'd probably be the most helpful. If not, any that show the stale zombies would still be good.

 

Pastebin.com should work for any file that's under a mb. Just copy + paste its contents and submit it. Then copy and paste the web address of the submission here.

 

Link to comment
Share on other sites

4 hours ago, EnigmaGrey said:

Understood, Fadoli. Just please note that for now I consider your issue separate from Modin's, even if it's similar in nature.

 

Could you grab your log so we can see if it differs from Modin's screenshots of theirs or not? It'd be quite helpful to see if what I'm assuming is abnormal actually is "normal" even without the mod or not. They're stored in %UserProfile%\zomboid\logs and are sorted into folders by date. If you remember the day/time of the worst example, it'd probably be the most helpful. If not, any that show the stale zombies would still be good.

 

Pastebin.com should work for any file that's under a mb. Just copy + paste its contents and submit it. Then copy and paste the web address of the submission here.

 

Hey I can make an other support bug report if you prefer to not get both mixed in.

I've published the log of yesturday's bug, as well as the day I had it happens the most (it's > 1 months old).

It's all on this github repository : https://github.com/Fadoli/PZ_StaleZombiesBugReport , tell me if you're okay with how i formated things (one sub directory for each different game sessions)

Link to comment
Share on other sites

21 hours ago, fadoli03 said:

Hey I can make an other support bug report if you prefer to not get both mixed in.

I've published the log of yesturday's bug, as well as the day I had it happens the most (it's > 1 months old).

It's all on this github repository : https://github.com/Fadoli/PZ_StaleZombiesBugReport , tell me if you're okay with how i formated things (one sub directory for each different game sessions)

Great, thank you.

 

I'll give it a more thorough going over on Monday, but a quick look seems to suggest it's only removing a small number of zombies each time and their IDs don't go past 5000, which is quite different compared to when the mod is used.

 

I'll try to force it to happen here and see if we can tell what it is.

 

Note though it might not be something that's preventable: since zombies need to be updated every 5 seconds to avoid becoming stale, the packet(s) to do so might not have made the trip or there might be enough zombies responding to the gunshots that it's hit its maximum of updating 5k zombies, so is not updating other zombies. Quite possibly, if it's the latter, the MP team will be able to address it by adding a distance check to the player, so that the closer zombies take precedence over ones further away (if that's not already done). 

Link to comment
Share on other sites

  • 7 months later...

Hi I'm back

 

I've investigated the issue on my end with the help of modders

 

The problem, I believe, is that as chunks get unloaded serverside to save on memory when the player moves, so do all the zombies of that chunk. And those zombies include the ones which have moved sufficiently far away to physically in the game world not be in that chunk at all, but in the game's code still technically be in it. The zombies get deleted with the chunk serverside, but not clientside, because the clientside code does not have that limitation (which is why the bug does not happen in SP, only MP).

 

When that happens, the server removes the IsoZombie from the world while the client does not. In the act of removing the zombie, it changes its auth to null however, which the client picks up on. This is why the client then promptly discards the zombie after it's timed out (more than 5000 ms since last remote update).

 

[C] -----------------> (z)-> <-(p)

 

Player (p) is far enough from chunk [C] so that the server decides to unload [C]. Zombie (z) in front of the player visually does not belong to [C] anymore as it has travelled some distance already, but technically still belongs to [C] in the code, as the code has never updated its chunk. (z) is removedFromWorld with [C]. The player's client only receives the command that (z) now has no authOwner (it is now null), so the zombie turns around, awaiting the server to handle it remotely, which does not happen so it stands there and does nothing. 5 seconds have passed since lastRemoteUpdate was last set to 0, "removing stale zombie 5000" message is displayed and the zombie is removedFromWorld on the client's side.

 

That's about it. To fix this issue, the zombie's chunk should be updated live or at least checked during any chunk deletion.

 

I'm gonna try to implement something on my side if we have to wait another year for b42. Kind of a big problem for everyone on MP servers - kills immersion.

Link to comment
Share on other sites

Back again with more info.

 

Previous post is correct. To summarize: IsoChunk gets removed because it's far enough, 'for' loop initiates to remove everything in that chunk, and inside of that loop zombies are found to be occupying squares, so they get removed.

 

Except! Some zombies are not there. The IsoGridSquares inspected do contain the zombies in their array list, but the zombies are not physically in those squares in the game. The zombies get deleted while being far from said square (e.g stale removal, e.g zombies going poof in front of players). How come?

 

Because the squares are never updated. But why? Because the serverside devs forgot to update them, simply. They are updated properly clientside, which is why the client is confused about the deletions, and displays a "stale zombie" message and times out the zombies. Also why the bug is not present in SP. But the squares are never updated serverside.

 

To be precise, the squares are updated in the postupdate() method in IsoMovingObject, but that code only executes clientside. Serverside, an IsoZombie's current attribute is updated in applyZombie used by parseZombie used by receivePacket all in NetworkZombiePacker, when the server receives an update from a client about a zombie. But that's not enough - 'current' might be updated but the IsoGridSquare arrays themselves (called MovingObjects, containing all moving objects occupying that square) are not.

 

Hence serverside, the first square that a zombie occupies (the one it spawns on) contains it because it is set in setMovingSquareNow of IsoMovingObject (used on zombie creation/reanimation). And then, it's never updated, it contains it forever, no matter where the zombie moves.

 

The solution is to update the squares, as done in postupdate, but to do it in applyZombie for the server.

 

 

Link to comment
Share on other sites

Alright just add

 

        zombie.setMovingSquareNow();

 

To applyZombie() in NetworkZombiePacker.java

 

After

 

        zombie.setCurrent(square);

 

And you're done, no more stales whatsoever.

 

This properly updates the IsoGridSquares serverside as a zombie's current is updated after receiving a packet from a client.

Link to comment
Share on other sites

  • 4 weeks later...

Just a quick update, adding SetMovingSquare to the applyZombie method works fine to fix an IsoGridSquare's MovingObjects being properly updated when a client sends back a zombie's position to the server.

 

But if the zombie is actually remote, then I believe that the IsoGridSquare's MovingObjects will still not be properly updated as the server simulates the zombie moving around for whatever reason. I believe the server's own update methods for the zombie do not remove or add to any square's MovingObjects, ever. The client, however, will, and that will result in another stale message.

 

This shouldn't harm the player experience much and is why I haven't really given a good look at this, but it's still a bug and still generates "removing stale zombie" messages for clients.

 

I am not 100% sure on this info so it'd have to be verified by devs.

Link to comment
Share on other sites

  • 4 weeks later...
On 12/12/2023 at 5:09 PM, nasKo said:

Thanks again!
One of the things we need to do is have the MP guys look into zombie culling once the recent performance overhaul can be merged. We've made sure that they'll be aware of your investigation into this, also.

Hey there everyone.

 

Please excuse my ignorance, I don't know how this forum works. I just created my account now to give some more information on this topic.

 

I bought 2 copies of this game like 2 weeks ago for me and my wife on steam after my brother suggested it.

 

I don't know about any mods or coding things, or anything like that, but I have read that I now need to get a mod to fix the zombies disappearing?

 

I hosted a world with my wife and brother and we had attracted tons and tons of zombies using a police car.

 

However, when I turned away from them to reload my shotgun, and then turned back to face them, they had all disappeared :( 

 

I know my computer can handle running the server (?), as it is an extremely high end custom built PC - as is my wife's - so I don't think they're too weak to handle it?

 

I also read that we must use "normal" mode, set things to "normal", as Enigma suggests? I didn't change any settings in the game, so I assume that it is in "normal" mode by default?

 

What is the name of the mod to fix this and how would I do that? It upset my wife as she wanted to kill off the huge group of zombies haha :)

 

Thank you for your time and patience with my lack of knowledge on this.

Joey

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...