FPS Drop after Bandits update?

The next update will be available on Wednesday, December 18, in the early evening (GMT+1).

This update will not yet replace the Java version, instead it is the actual content update. We'll provide more information about the transition together with the update.
  • Hi


    My impression is after bandit update, FPS dropped. Overall around 10 frames but more worse in some area with many construction elements. Before i was some area and have stable FPS, like 100 for example. After update i see in same areas (with chunks with many elements, severe FPS drop like 40%. And another thing i see: if before FPS was very stable in a area, a plus minus few frame now in game FPS indicator is very "jumping": now display 100 and after a few seconds drop to 60 and after come back to 100 and so on. As i mentioned same settings in game and almost same areas.


    This thing is just for me or any have similar issue after Bandits update?


    Thx.

  • That's weird :thinking: Hard to tell what's causing it... there are basically two things that could be responsible for this: this is either related to many npcs spawning (or being actively alive in your proximity), especially if spawn rates are set to higher values or if skeleton spawn at night is enabled, lots of npcs could end up in your area. Or this could be related to the engine version maybe (we've updated to Unity 2023.1)...


    When experiencing the drops, do you mind sending a report about that? Maybe the log file contains more information about what's going on. To do that, just open the console and type "report" (maybe add some additional information then, like "sporadic fps drops") :)

  • I further tried some settings in config. It seems the shadow have the biggest impact. If i disable, fps rise up almost like before update. But game look bad without shadows. So i guess unity update handle more bad shadows than previously version :(


    And when say many NPC what mean many? 10, 100, 1000? I have around me under 15 animals (horses, cow and sheep).

    What is weird regarding that is that is info from debug info (F3). I remember in the past say something NPC x/y where x was npc in proximity and y total number of npc from world? But now .. it say 26976/24862. Somethings is strange here.


  • Wow, these are many npcs :wat: The 1st number is the amount of visible npcs, i.e. actively loaded npcs in your proximity (this is the problematic number), and the 2nd number is the total amount of living npcs in the world (this number isn't problematic at all).


    It's weird that the 1st number is higher than the 2nd number... this indicates that the game either can't keep up with despawning npcs (those npcs which either die or npcs which are not persistent, like skeletons, ghouls etc), or something is wrong there :thinking:


    However, the 1st number is definitely too high (and most likely the reason for the fps drops). It means that there are 26k npcs in your direct proximity ("proximity" is basically the area of loaded detail chunks). A reasonable number is supposed to be below 100, but below 1000 is probably also ok (there is no strict limit, but the higher the number, the higher the impact on performance)...

    Do you mind sending a report (as long as these numbers are that high)? It could maybe contain more information about what's going on (and why the 2nd number is lower than the 1st one) ^^

  • Problem is i think if i go far away to another place on island, it's seem the high number of NPC remain. Some is weird here. I contact server admin to take a look and maybe find a possible cause. For sure this number go out of limit after NPC update, before was ok, 0 to a a few number in proximity.

    What distance count npc number in first number?

    I am sure in proximity no visible animals, and go even to hell and no npc here under me.


    Update:

    When i log in game in proximity show only 22 npc. I sent a report. After a while (minutes) number start risen quickly at over 12k. No npc visible beside first 22 .. I sent another report maybe is useful to see what happen here. When number start to risen another player come to my proximity. I don't know this is related or just a pure coincidence.

  • Hi Red,

    and the 2nd number is the total amount of living npcs in the world


    My thoughts here. I've set the dead bodies despawn time very high.


    I have in the past seen NPCs fall through the world particularly during chunk loading or if a player has a bad ping/connection.


    The fact that there are more dead NPCs in the area than living NPCs in the world may indicate that the NPCs are dying, falling through the world, and then triggering a loop of NPC spawns and deaths. This in conjunction with the dead NPCs not being "garbage collected" would cause an NPC "memory leak". Big air quotes here.


    I may be able to detect this via the API and delete the NPC.


    I am thinking, onNPCDeathEvent, grab the y value, start a short timer, then check the y value again. If the y value is say for example -10 units down on the originally recorded y value on the event, we could make an assertion from this that the NPC has fallen through the world and then call the npc.delete() method to remove it?


    Maybe this might work :thinking:

  • Update 2



    I moved several chunks from initial position and big number of proximity NPC remain high. But after relog in game it show only 1, my horse. So i think information from debug is wrong.

    I suspect a condition when another player come in proximity something happen. I was correct. If another player come on horse, my counter of NPC in proximity fast start to rising for every move of player horse. If player dismount counter stop risen. So here is a bug. Or is just a sync problem, or more worse a player leave a ghost npc horse on every move.


    In image uploaded, the number of npc in proximity grow to over 10k after a player move on mount near me. After relog it show only 1 before player come close.


    And i think another thing wich show wrong in debug info is number of world item which i own? Game think i own -7 ?:crazy:. Maybe is related with sync of data to server? This number is not allways -7 but i see many times a negative number.


    PS: I sent several report too




    Thx.

    Bamse


  • Sorry for my late response! But thanks for the reports! They indicate that there is indeed a bug in the game, regarding the death of npcs, as suspected by yahwho (although they're not falling through the ground or getting stuck in a spawn-death-loop): in fact the bug occurs when an npc dies and drops an item - it prevents the npc from dying correctly (clientside). Most likely that's the reason why the number gets high over time (and why the numbers are sometimes messed up).

    This can be "fixed" by changing the serverside setting Setting_NpcDropEquippedItem to False (in the server.properties file). This can only be done by the server admin. Unfortunately it prevents npcs from dropping their equipped item, but I'd still recommend to disable it for now :thinking:


    I have in the past seen NPCs fall through the world particularly during chunk loading or if a player has a bad ping/connection.

    Do you still experience this issue? While in theory it's possible that an npc still falls through the ground, it should be ported back to the surface once a player gets closer to it again. However, there might still be old npc instances somewhere underground from earlier updates (if a player never got into their proximity, they might still be stuck there) - but on the other hand, they shouldn't have a considerable impact on performance.


    I am thinking, onNPCDeathEvent, grab the y value, start a short timer, then check the y value again. If the y value is say for example -10 units down on the originally recorded y value on the event, we could make an assertion from this that the NPC has fallen through the world and then call the npc.delete() method to remove it?

    After the NpcDeathEvent, the npc no longer exists. If there is a corpse (e.g if it was a bandit), it's still no longer considered an "npc" by the game. If npcs still exist after the NpcDeathEvent (unless the event was cancelled), that would be a bug (in this case a server log would be very helpful) :)


    And i think another thing wich show wrong in debug info is number of world item which i own? Game think i own -7 ? :crazy: . Maybe is related with sync of data to server? This number is not allways -7 but i see many times a negative number.

    Thanks for letting me know! It looks like this number is decremented (when an item is destroyed) even for items that don't belong to the player, causing this number to become negative in multiplayer :saint: This is a bug, but it has no negative impact on anything, because the game doesn't use this data (it's only tracked for debugging purposes atm) :D

  • Unfortunately it prevents npcs from dropping their equipped item, but I'd still recommend to disable it for now

    Hmm I assume this would be until the next update?


    Do you still experience this issue?

    I haven't seen this happen myself for some time. I know this used to happen on JMonkey engine.


    in this case a server log would be very helpful)

    I don't think there is any need for this. Sounds to me like this isn't the cause of the issue Bamse is describing.

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!