Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Questions regarding FPS and moving water  (Read 865 times)

Xenophilius

  • Bay Watcher
    • View Profile
Questions regarding FPS and moving water
« on: January 25, 2015, 04:29:20 am »

Hi to everyone. I've been watching the forums for quite a while and wanted to say thanks to all the people whose posts helped me to understand df.

Here is what I did. I had a nice fort under the ocean going at framerates between 50 and 150 (depending on what critters where on the map). I only have a small number of dwarves (24) so this has helped me to keep FPS up through about 20 in game years. Then I installed a plug at the deepest point of the ocean and pulled it, not surprisingly murdering my framerate (there was a tick every 10 to 20 seconds). So I let it run over night and when I came back the ocean had indeed drained and the game was running again at a stable rate of 4 to 8 FPS. I did some work in the ocean levels, put the plug back and let the ocean refill hoping to get my framerate back. Unfortunately: no such luck. The framerate went up a bit to about 20 but it is still miles from before the draining.

I already did some testing. DFHack flows still reports several hundred thousands of moving water tiles although there are none I am aware of. So I set all the update_liquid and update_liquid_twice flags to false (using again DFHack) saved the game and reloaded. Now flows shows no more moving water but my FPS is still at 20.

I know that it is possible to get it back up by retiring the fort and immediately unretiring it again. The framerate goes up to the levels it was at before I drained the ocean. Unfortionately this has the anoying side effect of flooding every single tile of the fort that I dug out (exept for any stockpiles surprisingly) with salt water.

Now obviously I want my framerate back. So here's a couple of questions:

1. Any hints how I could tell the game to acknowledge that there is no more running water calculations to perform?
2. Why is my fort flooded at unretire?
3. As a possible workaround: does anyone know what flag(s) differentiate between tiles I dug out and naturally empty cavern tiles? Any ideas what is special about stockpiles in that regard?
4. Could this be due to pathing? Maybe once the ocean was drained the game marked all it's squares as ok for pathing and now the algorith is always scanning the vast watery expanse for a possible path, that of course is not there? If so, is there a cure?
Logged

Melting Sky

  • Bay Watcher
    • View Profile
Re: Questions regarding FPS and moving water
« Reply #1 on: January 26, 2015, 01:35:22 pm »

This sounds like a pretty serious bug. You should definitely report this one as it is likely the sort of bug that is contributing to the FPS death of many long lived forts. I get the feeling that various phantom pathing loops like this are not just limited to flow either. We sometimes get odd phantom job type behaviors as well such as military dwarves returning to areas they were sent to battle long after those orders are cancelled and the enemy is long since dead. Phantom pathing routines could explain some of the permanent FPS loss when hidden fun is uncovered in the depths of the world. Even after the clowns have all perished the FPS hit one takes from that does not seem proportional to what you would expect from simply opening up a new area.

This is a very interesting observation you have made. It would explain why I have noticed permanent FPS loss after playing around with the plumbing under my fortress even after the water is no longer draining etc. Since pathing/flow is the most processor intensive activity run by DF it would make sense that it is a big part of what is contributing to FPS death and any bugs that are causing superfluous pathing calculations are serious ones that Toady should be made aware of.
Logged