Cave causing permanent lag even after leaving it

  • Steam or Standalone?
    Steam
    Singleplayer or multiplayer?
    Multiplayer
    Error message?
    No
    Operating system
    Windows

    On my dedicated server which is on my PC, which has 8GB ram allocated (my PC has 32GB ram), in a world we only recently started a few days ago, that has very little in the way of structures.


    There is a natural big hole next to my base, it was generated upon map creation. I am currently using it to dig down a bit. I did not dig very far, however, upon entering this hole, not even getting to my spot where I am digging at. My framerate drops from ~75 to ~15 and freezes every few seconds. All I do is enter the natural hole, I don't even do anything at all. Upon exiting the hole, the frames stay around 15, even though it's usually 75ish. I have one other player on the server, and the same thing happens when they enter the natural hole. Only by them, after the freezing stops, they start automatically uncontrollably walking backwards.


    This seems to be an issue with either the world generation or the server, considering we both have stable fps otherwise, only the hole causes issues. This has only been happening since today, all the time before the hole caused no issues at all. The only thing I changed was build a smelting furnace in my base, and a craft a warmsuit, that's it. Ever since then the hole issue started.


    I have currently no plugins installed.


    EDIT: I FIGURED IT OUT! "settings_npc_spawnrate_enemies_dungeon=3.0" is in my server settings. Somehow, this spawns OVER A THOUSAND skeletal warriors in a dungeon that was unknowingly right below my base. Me going into this natural hole triggered their rendering. This natural hole must be just BARELY within range to cause all 1000+ to be rendered. I have attached some photos, this was difficult with less than 5FPS, this is obnoxious, I just wanted a few more enemies, not THOUSANDS! How would one go about exploring this dungeon anyways? I would DEFINITELY try it if my fps didn't drop to single digits! Would be fun!


    I did the "deleteallnpcs CONFIRM" command which worked like a charm, fps is back to normal now. But I am wondering. since they seem to be spawning slowly and safely now, no overspawning so far, is it safe to leave the spawnrate at 3.0 or is that what is causing this glitch in the first place? I certainly would like dozens of bandits and skeletal warriors at once per group, if it were possible without glitches. This world was generated with the spawnrate at 3.0, the value was not edited later or anything.


    Hey red51, would the new version be able to actually have a proper setting for this someday? I would love to have ARMIES of bandits and skeletal warriors to fight due to settings and not glitches! Maybe something like 1.0 = groups of 3 bandits at a time, 1.5 = groups of 4.5 rounded up to 5, 2.0 = groups of 6, 250.0 = groups of 750 bandits, etc. The game didn't crash, my server ramped up to around 2.4GB memory, so I assume this would be technically possible in the new version? This glitch is just too amazing, honestly!

  • BOOST15673

    Changed the title of the thread from “Lag when descending into cave stays permanently” to “Cave causing permanent lag even after leaving it”.
  • I'm glad to hear you figured it out :) A "high" spawnrate is indeed quite problematic, since NPCs always spawn permanently, and over time, a dungeon may become overpopulated.


    But I am wondering. since they seem to be spawning slowly and safely now, no overspawning so far, is it safe to leave the spawnrate at 3.0 or is that what is causing this glitch in the first place?

    I'd recommend to set it to a value not higher than 2.0, otherwise you will run into the same issue again. In the game settings (for singleplayer), this value is actually capped at 2.0 (200%), but the server unfortunately accepts any value :|


    However, a value of 2.0 should be fine if you want many skeletons. It will take a few days though until a dungeon is fully populated.


    Hey red51, would the new version be able to actually have a proper setting for this someday?

    Yes, it is our intention to rework the way how the game interprets the spawnrate setting :) Currently this setting not only determines how many NPCs the game will spawn at once, it also affects the checks of the game if any other NPCs are in proximity - this is the main reason why it spawns so many NPCs over time...


    The game didn't crash, my server ramped up to around 2.4GB memory, so I assume this would be technically possible in the new version?

    Basically the NPC handling (rendering, animations etc) is quite efficient, currently the collision detection for NPCs has a big impact on performance: The Java version uses a pretty old physics engine which has limited functionality and also suffers from a few issues. We wrote an overly complex system for NPC collision detection to prevent them from passing through walls or falling through the ground, but this comes at a cost.

    This won't be necessary for the new version, since it uses a much more robust physics engine - so in this regard, the new version will handle NPCs more efficiently.


    Having that said, thousands of NPCs in close proximity will still have a considerable impact on performance in the new version. It's not a big issue at all for the server (NPCs have a rather low memory overhead, and stuff like AI handling is fairly optimized), but rendering them on the client is quite costly. But I can probably say more about that once NPCs are implemented ^^

  • I love Npc's, if they don't talk or moan like in The Sims ^^. I use a lot of them in a small area, and they have a very big impact on my performance, so I have to reduce my graphic options. I hope for better gameplay in the upcoming version.:)

  • Quote from red51

    I'm glad to hear you figured it out :) A "high" spawnrate is indeed quite problematic, since NPCs always spawn permanently, and over time, a dungeon may become overpopulated

    This is how I like it and think it should be. This will at least mean that over time, dungeons will become more and more deadly and difficult!

    Quote from red51

    I'd recommend to set it to a value not higher than 2.0, otherwise you will run into the same issue again. In the game settings (for singleplayer), this value is actually capped at 2.0 (200%), but the server unfortunately accepts any value :|

    Ah see that is where I messed up, in your Overview of "server.properties" topic, you stated that "settings_npc_spawnrate_animals" should not have higher values than 2.0, however, by enemies & enemies_dungeon, this is not noted, so I assumed this only applied to animals specifically, I guess it's meant for all three spawn rate settings huh? The server accepting any value will definitely be great in the new version if this bug gets sorted out, as previously stated, 250.0 value for groups of 750 bandits would be amazing! :wow:<3

    Quote from red51

    Having that said, thousands of NPCs in close proximity will still have a considerable impact on performance in the new version. It's not a big issue at all for the server (NPCs have a rather low memory overhead, and stuff like AI handling is fairly optimized), but rendering them on the client is quite costly. But I can probably say more about that once NPCs are implemented^^


    I am very much looking forward to this, NPCs breath so much life to the game, and getting heart attacks by getting shot by an arrow in the middle of nowhere is what makes it even better. You really did very well with both bandits & skeletal warriors!


    Quote from Deirdre

    I love Npc's, if they don't talk or moan like in The Sims ^^. I use a lot of them in a small area, and they have a very big impact on my performance, so I have to reduce my graphic options. I hope for better gameplay in the upcoming version.:)

    I too love NPCs very much. So much that depending on the game, I prefer NPC teammates over human ones, especially over strangers. I like how the bandits here just sound psychopathic, like hired assassins. I also hope in the new version we can have NPCs follow us and help defend us, doesn't need to be overly complex, just a basic system like the current hostile NPCs have. They could also have an inventory to help carry stuff too but maybe this is wishful thinking. But then how one would "craft" or "tame" an NPC would be an interesting question. Definitely a long-term feature if ever put on the list.

  • The last reply was more than 365 days ago, this thread is most likely obsolete. It is recommended to create a new thread instead.

    • :)
    • ;)
    • :(
    • :P
    • ^^
    • :D
    • :verysad:
    • ;(
    • X(
    • :*
    • :|
    • :crazy:
    • :lol:
    • :dizzy:
    • =O
    • <X
    • ||
    • :thinking:
    • :wacko:
    • :/
    • 8)
    • :wat:
    • :huh:
    • :silenced:
    • :wow:
    • 8|
    • :angry:
    • :thumbdown:
    • :thumbup:
    • :sleeping:
    • :hushed:
    • :nerd:
    • :saint:
    • :drooling:
    • :love:
    • :monocle:
    • :poo:
    • :party:
    • :drunk:
    • <3
    • :!:
    • :?:
    The maximum number of attachments: 10
    Maximum File Size: 1 MB
    Allowed extensions: 7z, asset, avi, bmp, dds, gif, jpeg, jpg, json, log, lua, mp3, mp4, ogg, pdf, permissions, png, properties, rar, txt, unitypackage, xml, zip

Participate now!

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