Установить Steam
войти
|
язык
简体中文 (упрощенный китайский)
繁體中文 (традиционный китайский)
日本語 (японский)
한국어 (корейский)
ไทย (тайский)
Български (болгарский)
Čeština (чешский)
Dansk (датский)
Deutsch (немецкий)
English (английский)
Español - España (испанский)
Español - Latinoamérica (латиноам. испанский)
Ελληνικά (греческий)
Français (французский)
Italiano (итальянский)
Bahasa Indonesia (индонезийский)
Magyar (венгерский)
Nederlands (нидерландский)
Norsk (норвежский)
Polski (польский)
Português (португальский)
Português-Brasil (бразильский португальский)
Română (румынский)
Suomi (финский)
Svenska (шведский)
Türkçe (турецкий)
Tiếng Việt (вьетнамский)
Українська (украинский)
Сообщить о проблеме с переводом
public static final int maxZombieCount = 500;
If I had to guess, this is the offending line of code. But I have little knowledge of Java (I used to do a lot when I was a teenager but have mostly worked with C++, C#, Python, Ruby, and Linux). I am not sure if there is any calls to this particular number, but I will try and get me and a friend to test before and afers of changing this value, if it is successful, then I will post it on the Steam workshop (I want to make sure that there is no tie ins for code, and importantly that using a higher value does something AND is relatively stable.)
I believe this is the code for how it counts zombies, so hopefully changing the count to higher will fix it (fingers crossed) once I am able to test it I will let everyone know :) good work Asdfer, you narrowed it down a ton :D thank you very much!
Next, I have for sure found the code for the zombie culling, but I am not exactly sure what is causing the issue with it culling down to 0. Since this tool I use to decompile is most likely different than the ones PZ devs use, I have no way to see what in the world is happening. My only guess is somewhere in the counting code it is being told to cull to 0 instead of 500, which is most likely in that previous file I mentioned.
Enigma, would you have any idea what compiler and decompiler is used for PZ? And if it is open source? I would like to poke around further >.<
As the system is handled in .class files it is not a simple matter of just decompile and compile since JVMs create .class files, if anyone knows a lot more about java I would greatly appreciate the input as all of my knowledge is both old and rusty, and I am simply learning as I go here. If anyone can reccommend an easy way to create .class files I can simply copy the code and hope it sinks up well (though there are a lot of weird issues with the code, like int and strings not being actually used, though I think it is also a specific compiler issue). I am going to try at some point tricking a JVM argument to create the .class file and hoping it calls and works, but this won't be today as I just finished a 8 hour shift and would like to relax.
Enigma would you please ask the devs to at least look at the culling code? I have, as I said, not a ton of experience with Java but it looks like the code culls it to 0, but then again I may be missing something in the decompile OR reading it wrong.
Hopefully stay tuned fellas and we can get this resolved and finally play PZ again :)
There's probably a bug somewhere in the code so that it culls zombies down to 0. Maybe the zombie count never goes down and only goes up and when too many zombies are around it hits 500 and starts culling literally everything even if the 500 zombies that were counted are killed/culled.
Maybe it's poorly implemented and the area where zombies are counted is so big that it easily hits 500 and then anything but those 500 (which might be very far from you) is culled so that it looks like all the zombies are culled, when in fact some 500 are lost in a corner somewhere far off.
That area might be fixed or might move with you, but I'm assuming it's fixed, since I've had zombies getting culled like crazy somewhere specific, and then not getting culled at all 200 meters farther south, also somewhere specific. That was probably because I crossed a cell boundary and the count was reset.
Maybe this count parses zombies from north to south and west to east, for example, meaning there would be 500 zombies clumped northwest and then a ghost town for the rest of the cell.
However, from my testing (not extensive, so I encourage you to try it), the "peekaboo" effect really only works with vehicles. Somehow the algorithm that checks whether a zombie is "in sight" and thus "not cullable" must consider a zombie still in sight when it's in your back and you're on foot, but not when it's in your back and you're in a vehicle. I don't know what the conditions are when you're on foot, maybe it only depends on range, maybe solid objects have to come into play to block line of sight. This might or might not be intentional.
I'm personally more interested in removing this mechanic altogether rather than fixing the bugs it introduces. Even if it were implemented better: the zombiest farthest to you are culled first so that you barely ever notice anything disappearing, it would still hurt difficulty and in-game coherence too much.
Having absurdly low amounts of zombies regardless of your settings (500 per cell instead of the regular 10k) removes that sense of constant danger, fear and vulnerability that we love about Zomboid. Spreading these 500 over the cell makes them trivial. Clumping them in a corner, or even around the player and removing every other one in the cell still makes it trivial once you understand what's going on and know you can just lose them and run around in a ghost town.
Keeping the mechanic but ramping up the numbers still makes it effectively counter the custom settings chosen by the host. It's effectively saying "anything more than 'X' zombie pop is useless, it all gets balanced back down". At this point, it's more interesting to simply implement an upper cap for that zombie pop setting in the first place - it's more transparent and makes more sense. No more zombies popping out of existence magically, whether seen or unseen - more consistency.
The only solution for me given the current performance problems is keep the mechanic as it is for everyone oblivious to it (apparently lots of people) and implement an option somewhere to disable it so that any host interested in doing so can play around with zombie pop settings themselves and figure out what works or doesn't work for their expected server/client hardware and amount of players.
My guess is that the threshold at which performance becomes a problem varies wildly depending on these factors: a low-spec mega-server with 50 low-spec players on will have different results than a high-spec server with 2 high-spec buddies on at most. I think it's a reasonable guess. Unless I'm gravely mistaken, I think it makes sense for the devs to make their system more flexible to account for these differences.
unless performance somehow got worse after I posted this (which I suppose is always possible lol) I have had no impact from the improved animations, with maxed out everything..... I am even the one hosting or playing SP most the time (though again haven't played in months as this single bug has all but removed my want to play).
Now of course I have no way to test a pop settings anywhere near the old days, thanks to this system or bug or whatever we are calling it, but I imagine that getting to those numbers might eventually drop the FPS worse then in old builds, but again even on my old PC (which was awful) playing with 4.0 pop only dropped my FPS when we literally created the biggest horde possible and threw a grenade at it (from a mod, goodbye FPS).
The thing that I think irks me the most, is this one update has made me go from considering PZ as the single best indie and zombie game period, to me not even recommending it anymore to people.... I really hope one day this gets resolved.
I am.... unsure if a mod will be able to. The problem is how Java handles its code and files, a .class file is not really in my knowledge window of how to create.
Fingers crossed either I can figure it out, or someone with the knowledge can come by and give us the info. Either way it is literally as simple as changing 1 line of code to increase the limit, or adding a toggle into it. It could be fixed in an evening -.- but now I have to spend my hours figuring out how to fix it :/.
If/when I do I will post the file here, it will be as simple as copy and paste over the previous file and poof its done. Only thing that will be bad is you may have to reapply after steam updates. But yet again this is all depending on if the code takes too when I finally figure it out, as if my theory about the decompiler is right, it may not work at all >.<.
I do fear that NPCs in multiplayer is going to be a MASSIVE hurdle though if there's this much trouble with just the zombies.
Simply delete the file: ZombieCountOptimiser
I ran SP and nothing happened as opposed to last time.
I did finally get some FPS drop once I had about 700+ zombies on screen, though the thing that bugs out more quickly is the sound, the game is not a huge fan of it at all.
If anyone would like to play PZ with high settings I would recommend deleting that file until the devs figure out something to either fix this issue, or remove it entirely.... Which will hopefully happen at some point.
I will try and get my friend to test on MP later on to see if it will work on a server as well (both as a host and as a client)
about 3.0 zombie settings seems to be a good sweet spot, enjoy! Fingers crossed nothing breaks :) (I started to notice sound cut outs at about 600+ zombies, a bit before I saw my first frame drop, so keep that in mind. I figure turning off ingame music might help as I assume it's a resource issue with java and the coding for PZ). I am going to attempt to test a few more things performance wise and see how everything lines up, and see if I can get the music and sound stable, I will respond here if I do :)
Go to:
ProjectZomboid64.json and change Xmx to 5120. 5GB of RAM and the music no longer cuts out, and it was able to handle a few more zombies before losing FPS.
I will note, I am testing peak day 1 4.0 max at 4.0 pop, so the highest possible zombie count you can possibly go, in muldraugh on maintown, and it is working. On to the MP test!
EDIT: Ok hosting crashes the game. Because the culling mechanic is supposed to only be called in MP I assume, unsure why SP culls sometimes who knows. So back to creating a custom .class file!
I find the game very playable on my setup (6900 + 12700kf). It does stutter when I spawn 500 zombies right in front of me, but then it also stutters when there are 0 zombies and I just zoom out a bit, lol. The game's performance is all over the place, that's no secret, whatever.
I've very rarely had 500 zombies in view. A realistic amount of zombies for me is something like this: https://i.imgur.com/CR867t4.jpeg maybe 300-400 zombies surrounding me, and that was with a chopper, not a 24/7 situation.
The problem with culling, btw, is not that it prevents this kind of situation. It doesn't just prevent having more than 500 zombies right in front of you. It prevents having more than 50. Hell, 30 or even 20 at times. It prevents entire streets from having any zombies in them. It goes from the screenshot I took, to a completely empty town in the span of 2 days of running around the city, going into the woods, and then coming back.
I'm gonna keep calling this gamebreaking. It's not a "can't have absolutely insane pop levels but can still have up to 500 zombies in front of you" situation, it's a "can't have more than 50 odd zombies at a time wandering around the streets" situation.
I don't understand. Culling is MP-only, you can play SP however you like, have 1 billion zombies around you if it strikes your fancy. I've never seen any sort of culling anywhere in SP. Except for my own, lol.
Sound bugging out is something that the recent patch introduced, with the revamped music. The music keeps cutting out, even when the amount of zombies is "reasonable" like maybe 100-200 around you.
I will admit I did not test increasing ram, maybe this could work. I don't really play much anymore though.
You can add me as friend and give me the file and I'll test it for you :)
A lot better, and no noticeable performance issues.