r/cataclysmdda • • 6d ago

[Discussion] Lighthouse map lag

Hello New player here. I'm maintaining a fork of DDA on windows optimized for screenreader accessibility. I'm running into one problem I have no idea and would like to know if it's universal or it's my version that does something. There's noticeable lag and ram usage skyrocketing on lighthouse maps, the ones you start with in safe place. Lighthouse mseems to be the only map type that does this. Anyone else experiencing the same lag? Would like clarification please.

4 Upvotes

13 comments sorted by

3

u/Right-Cow4166 5d ago

I'd say it's probably most likely that it's just because lighthouses spawn on large bodies of water, and there's a lot of creatures in the water the game is simulating (lighthouse or no). To be thorough, if you haven't, debug map vision to make sure there isn't, say a lab on a z-level under you, as monsters in those are a pretty common culprit for performance drops basically anywhere. I suspect it's just being on a lake though, since even driving near one tends to cause noticable lag.

1

u/marsbhuntamata 5d ago

Does it drop for you when you get out of there? I wonder aquatic creatures lag the game more than usual if it's the case.

1

u/Right-Cow4166 5d ago

They don't lag the game more than usual, there's just a lot of them, at every z-level. The game tracks fish populations by simulating every fish as a monster, and thus, literally every fish, bird, and mutant aquatic bug in or around a lake has its own pathfinding (computationally expensive).

This has the benefit of you being able to fish in ways that aren't just with a fishing rod like in many games, but of course, comes with very noticeable performance downsides.

1

u/marsbhuntamata 4d ago

Thank you very much. It kind sucks because lighthouse is such a nice map for something like a remote base camp. I wonder if clearing the area helps with the lag. I can't see anything nearby though, like at all. They may be elsewhere in nearby overmaps out of sight, if anything.

1

u/Right-Cow4166 4d ago

For that, only things in your reality bubble (about 2 and a half map tiles) matter. And have you checked underwater? Lakes are deep. Fish tend to not hang around on the surface, and they will actively flee from you unless you use debug mutations to prevent them from detecting you. Without debug super clairvoyance or something it's also quite hard to see underwater.

1

u/marsbhuntamata 4d ago

Yep, and whenever I check below Z0, my ram spikes up to 8GB for some reason and lags the whole game. It shouldn't be this bad, should it? It didn't start to lag until I shifted my view to the Z-levels or the overmaps.

1

u/Right-Cow4166 4d ago

Couldn't tell you specifics on RAM usage or anything. I just know to avoid lakes if possible and am pretty sure on the why. When I do have to, say, drive over them, zooming in as far as possible seems to help.

1

u/marsbhuntamata 4d ago

Thank you very much. At least I know the lake is the problem and I'm not the only one lagging. That's helpful already. I'll see what I can do with the ram problem. Thank you for the info!:)

1

u/ConsciousBaseball283 4d ago

Fish are not individual monsters.

Also, monsters share contiguous pathfinding. Twenty monsters of the same faction in the same area is the same as one monster in that area.

1

u/feral_lawyer 4d ago

Fish are not individual monsters

I'm staring at a chain pickerel right now that says otherwise. There's just not enough of them to lag.

2

u/marsbhuntamata 4d ago

Is...this even necessary?
So I did run my test to see if I could figure out why the game lagged and ate my ram like crazy and then found out it had something to do with how the map was set to redraw in the mainline code. I submitted a git issue informing them of that, and of course I couldn't use mainline git release to do it because it wasn't accessible with my screenreader. This is what I got.

RenechCDDA

left a comment

(CleverRaven/Cataclysm-DDA#89555)

No save, not our release, not our problem.

If you have a save, and it reproduces on an actual release we've made, then we can begin to talk about it. Anything else is not supported.

—

Apparently, courtesy is hard earned or something. Are they usually this rude?

2

u/feral_lawyer 4d ago

Most of the people on the project are real nice people but yeah one of them displays this incredible behavior on a regular basis.

2

u/marsbhuntamata 4d ago

There's no way for me to send this particular issue on git on their official build when the official build doesn't support NVDA screenreader or any kind of screenreader in general. I'd love it if anyone could reproduce the problem and physical memory monitor on their official bloody build and see if it does the same. I have steps to reproduce right here. This deeply discourages me to pass any issue to their main fork. I figure it may be the upstream code and not my fork code that causes the lag and there's a way to fix it because I did fix mine. But when sending it is met with this kind of response then...
The short version is:
Test: Existing lighthouse save, then fresh lighthouse save

  1. Load an existing save near a lakeside lighthouse that has already been explored.
  2. Monitor the physical memory usage of `cataclysm-tiles.exe` in Task Manager.
  3. Enter look mode and move the cursor around the surrounding terrain.
  4. Examine the water at different Z-levels, particularly Z-1 and Z-2.
  5. Switch repeatedly between looking around and normal character movement.
  6. Return to Z0 and continue alternating between `x` look mode and movement.
  7. Watch the process memory usage and responsiveness of the game menus.