BlackJar72 / DoomlikeDungeons

A procedural multi-room dungeon generator for Minecraft
https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/minecraft-mods/1293843-doomlike-dungeons
MIT License
23 stars 12 forks source link

worldgen lag #13

Closed Phixaen closed 6 years ago

Phixaen commented 6 years ago

21.01 21:28:13 [Server] FML Doomlike Dungeons loaded a new chunk (-13, -6 Dimension: -1) during chunk population, causing cascading worldgen lag. Please report this to the mod's issue tracker. This log can be disabled in the Forge config.

BlackJar72 commented 6 years ago

Did it actually lock-up the game (not just lag for a second). If the game completely locked-up then there may be cascading generation. Limits are placed to prevented that (specifically there is a minimum density of dungeons). If it does not lock-up your PC, then this is simply intended behavior and Forge is giving a false alarm.

All the chunks in which the dungeon exists will be generated when it does (if they haven't already generated). This is not the properly Minecrafty way of generating, but its how the mod was designed and has always worked. If it was a true cascading generation problem then it would not stop until the entire map was generated (i.e., never).

Phixaen commented 6 years ago

It wasn't more than a few seconds, it's the only reason I even opened the console to look. Sorry, hadn't seen this before and thought it can't hurt to post here.
Thanks for the quick response!

BlackJar72 commented 6 years ago

A few seconds shouldn't happen (unless you are a very fast form of movement) -- anything will lock up then. Maybe 1-2, though 1 should usually be the limit (if its this mod). But that's what I suspected -- Forge is getting stricter, and putting in more warnings. Unfortunately, when I was first making this I just did the obvious, and simply had the dungeon planned and then built. If I made a new sequel from scratch I'd do it right, but don't have time to re-do it now. I basically know how to do things like this the way Notch intended now, but re-doing that would be a bigger project than I have time for at the moment. As it is, it can cause lag spike (about 1/4 to 1/2 second) with lots of exploration; not usually noticeable or with just a handful of players online -- the Java garbage collector is worse, but this can happen.

The error is more for if each chunk cause more chunks to generate in a chain reaction -- maybe not always infinite in theory, but that's the idea.