JereKuusela / valheim-dungeon_splitter

The Unlicense
0 stars 0 forks source link

Feature Request: Cached Dungeon Loading? #3

Open Deadmano opened 2 weeks ago

Deadmano commented 2 weeks ago

I have this weird spot in my base where if I transition between two floors it wants to load up some nearby dungeon, the logs show:

[Info   : Unity Log] 07/07/2024 07:27:09: Dungeon loaded with 14 rooms in 0.5016 ms.
[Info   : Unity Log] 07/07/2024 07:27:09: Loading room prefabs asynchronously
[Info   : Unity Log] 07/07/2024 07:27:09: Spawning dungeon
[Info   : Unity Log] 07/07/2024 07:27:18: Loading dungeon
[Info   : Unity Log] 07/07/2024 07:27:18: Dungeon loaded with 14 rooms in 0.5042 ms.
[Info   : Unity Log] 07/07/2024 07:27:18: Loading room prefabs asynchronously
[Info   : Unity Log] 07/07/2024 07:27:18: Spawning dungeon
[Info   : Unity Log] 07/07/2024 07:27:29: Loading dungeon
[Info   : Unity Log] 07/07/2024 07:27:29: Dungeon loaded with 14 rooms in 1.0411 ms.
[Info   : Unity Log] 07/07/2024 07:27:29: Loading room prefabs asynchronously
[Info   : Unity Log] 07/07/2024 07:27:29: Spawning dungeon

Is there anything you might be able to do to prevent this from happening? It keeps doing this if I move back and forth between two very short points, which must be just at the edge of whatever dungeon it is trying to load. The reason why this is such an issue is that each time it does this my FPS will drop to under 20FPS temporarily which is a major drop as it loads it in.

JereKuusela commented 2 weeks ago

I think it should be doable. Now it loads nearby dungeon floors to make teleporting work.

But I could change the teleporting itself. Might take a few days to implement.

Deadmano commented 2 weeks ago

I think it should be doable. Now it loads nearby dungeon floors to make teleporting work.

But I could change the teleporting itself. Might take a few days to implement.

No worries at all! It turns out my issue with the FPS drop was the area being loaded that contained TONS of item drops from another mod, and them not being cleaned up. Not sure if that is something that would fall under the scope of this mod.

Regarding audio changing when I go between these two spots that force the dungeon to load, do you think there might be a connection there? Not sure if the audio is on its own thread, but it changing just by going between two floors is rather odd.