Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Defensive drawbridge greatly impacting FPS?  (Read 1776 times)

pytor

  • Bay Watcher
    • View Profile
Defensive drawbridge greatly impacting FPS?
« on: October 13, 2012, 01:59:01 pm »

I just started a new fort, and having got the first few rooms dug out and workshops set up, I dug a small channel at the entrance to my fort and then built a bridge over it. As soon as I did this FPS dropped by fully 50% and despite me having waited a while, hasn't gone back up again. What gives? I'm playing on a midrange computer and am trying my best to preserve FPS where I can (no weather, small embark zone, low pop etc). Is this drawbridge defense thing something I'm just going to have to avoid doing for performance's sake?
Logged

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: Defensive drawbridge greatly impacting FPS?
« Reply #1 on: October 13, 2012, 02:16:32 pm »

I've built such a drawbridge set up before and not seen such a performance drop, so that's not normal as far as I know.  You didn't end up causing any water flows or anything by digging the channel, did you?
Logged
Through pain, I find wisdom.

Wannazzaki

  • Bay Watcher
  • [PRONE_TO_RAGE:9001][TOO_HAIRY][ADAMANTINE BEARD]
    • View Profile
Re: Defensive drawbridge greatly impacting FPS?
« Reply #2 on: October 13, 2012, 02:32:20 pm »

In theory the drawbridge should INCREASE performance. If by defensive you mean atom smashing. If you aren't using it as a giant smashing board it should, again, increase performance as it blocks off pathing, meaning the dorfs wont consider the outside as viable pathing area, so wont calculate it, increasing speed. I'd go look at your pumps, rivers and mist generators. Or fires. Smoke/mist/flow hammers FPS something fierce if you are balanced on a knife edge of "100fps" and "Light on the disc"
Logged
Son of Slaanesh, full of desire, He does cocaine and his head's on fire! DOOOOOOOOOOOOOM Rider! Doom rider! Na na, na na!

Seraphim342

  • Bay Watcher
  • Magma Cum Laude
    • View Profile
Re: Defensive drawbridge greatly impacting FPS?
« Reply #3 on: October 13, 2012, 02:56:44 pm »

Does your FPS change significantly with the bridge up or down, or does the state of the bridge make no difference?  I've had similar experiences like this that turned out to be related to pathing issues. 
Logged
I like to think that on the other side of the world a human is walking on the beach, notices the water level suddenly drop twenty feet, and whispers "fucking dwarves."

"The cows seem to lose bowel control when launched... I consider this a feature."

Zivilin

  • Bay Watcher
  • Dwarven Science Division
    • View Profile
Re: Defensive drawbridge greatly impacting FPS?
« Reply #4 on: October 13, 2012, 03:29:55 pm »

Deconstruct the bridge for conclusive evidence whether it was indeed the cause of the FPS drop. If the FPS return to their original state, then this is a pretty baffling case - as others have stated already, defensive drawbridges (as barriers) tend to reduce the computational load by limiting available pathing space. If not, then the drop was related to something else.
Logged
No signature

Kofthefens

  • Bay Watcher
  • Keep calm and OH GOD CAPYBARAS
    • View Profile
    • Marshland Games
Re: Defensive drawbridge greatly impacting FPS?
« Reply #5 on: October 13, 2012, 06:03:11 pm »

Perhaps its an unrevealed ambush that can't get in?
Logged
I don't care about your indigestion-- How are you is a greeting, not a question.

The epic of Îton Sákrith
The Chronicles of HammerBlaze
My website - Free games

Xob Ludosmbax

  • Bay Watcher
    • View Profile
Re: Defensive drawbridge greatly impacting FPS?
« Reply #6 on: October 14, 2012, 01:45:23 am »

Failed pathing is "worst case", as it checks every reachable tile before deciding that the tile it's attempting to reach isn't, in fact, reachable. 

So, if the bridge is blocking access, it can significantly impact performance.  If, however, the bridge is fully pathable, it should have little to no effect, and certainly not such a significant difference. 


Does raising/lowering the bridge make a difference?  What kind of difference?  Is there anything under the bridge?  Are there any other things that happened at about the same time?

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Defensive drawbridge greatly impacting FPS?
« Reply #7 on: October 14, 2012, 02:45:15 am »

Failed pathing is "worst case", as it checks every reachable tile before deciding that the tile it's attempting to reach isn't, in fact, reachable. 
...

No, this is not quite correct. When the bridge is raised/lowered, or when a door is locked/unlocked, or when a hallway intersection gets blocked by fluid (say a magma spill), the game recalculates the pathfinding "zones" and gives areas that are inaccessible to eachother different zone numbers. This is how the game knows that no material is available if you try to build a wall outside when your drawbridge is closed - the items are located on tiles in a zone that is inaccessible to the build site. When you lower the bridge or unlock the door, the zones merge into one zone. This process creates lag if you constantly raise/lower bridges to atom-smash.

A creature knows immediately if the tile it is pathing to is inaccessible, based on the zone numbers.

pytor

  • Bay Watcher
    • View Profile
Re: Defensive drawbridge greatly impacting FPS?
« Reply #8 on: October 14, 2012, 04:15:32 am »

Does raising/lowering the bridge make a difference?  What kind of difference?  Is there anything under the bridge?  Are there any other things that happened at about the same time?

I haven't been raising or lowering the bridge as I haven't even attached a lever to it yet. As soon as I built the channel and bridge the FPS crashed and I stopped playing to try and figure out the cause. There is nothing under the bridge except a pit that is one z-level deep. As per an earlier suggestion I deconstructed the bridge and built a floor over the channel and the FPS is still as bad as it previously was.

Was there anything else that you did at nearly the same time, perhaps turning on a 500 z-level magma pump stack?

The fort right now is just a few rooms dug into some rock. I only just got my first migrations and have 19 dwarves total. There certainly aren't any 500 z-level magma pumps or other huge constructions that could have caused this.

I'd go look at your pumps, rivers and mist generators.

I dont' have any of these as far as I know unless 'mist generators' are natural (I don't know what they are). I specifically embarked somewhere with no river or brook or anything like that for the sake of FPS. I haven't built any pumps or anything along those lines, I have literally just dug out a few rooms and that's it.

Perhaps its an unrevealed ambush that can't get in?

How would I check this?
Logged

Wannazzaki

  • Bay Watcher
  • [PRONE_TO_RAGE:9001][TOO_HAIRY][ADAMANTINE BEARD]
    • View Profile
Re: Defensive drawbridge greatly impacting FPS?
« Reply #9 on: October 14, 2012, 09:51:53 am »

Mist generators are waterfalls which produce mist. Dorfs love mists. It's a shame mist hates your FPS
Logged
Son of Slaanesh, full of desire, He does cocaine and his head's on fire! DOOOOOOOOOOOOOM Rider! Doom rider! Na na, na na!

Kofthefens

  • Bay Watcher
  • Keep calm and OH GOD CAPYBARAS
    • View Profile
    • Marshland Games
Re: Defensive drawbridge greatly impacting FPS?
« Reply #10 on: October 14, 2012, 11:02:16 am »

Perhaps its an unrevealed ambush that can't get in?

How would I check this?

By opening the bridge (once linked to your lever), then seeing if hordes of goblins start killing your dwarves. Alternatively, you could just chuck a cat out there.
Logged
I don't care about your indigestion-- How are you is a greeting, not a question.

The epic of Îton Sákrith
The Chronicles of HammerBlaze
My website - Free games

Xob Ludosmbax

  • Bay Watcher
    • View Profile
Re: Defensive drawbridge greatly impacting FPS?
« Reply #11 on: October 14, 2012, 05:09:11 pm »

Failed pathing is "worst case", as it checks every reachable tile before deciding that the tile it's attempting to reach isn't, in fact, reachable. 
...

No, this is not quite correct. When the bridge is raised/lowered, or when a door is locked/unlocked, or when a hallway intersection gets blocked by fluid (say a magma spill), the game recalculates the pathfinding "zones" and gives areas that are inaccessible to eachother different zone numbers. This is how the game knows that no material is available if you try to build a wall outside when your drawbridge is closed - the items are located on tiles in a zone that is inaccessible to the build site. When you lower the bridge or unlock the door, the zones merge into one zone. This process creates lag if you constantly raise/lower bridges to atom-smash.

A creature knows immediately if the tile it is pathing to is inaccessible, based on the zone numbers.

I stand corrected.  It's always fun to learn something new about the internals.