Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Carving ramps -> Framerate drops  (Read 1061 times)

Lesconrads

  • Bay Watcher
    • View Profile
Carving ramps -> Framerate drops
« on: April 18, 2009, 06:08:10 pm »

Herro Forum

I have quite a problem with carving ramps. Somehow, i get a really annoying lag whenever my miner tries to remove a ramp/ carve a ramp that somehow changes other ramps.
This Problem occurs in 40d and 40d11 and is driving me crazy.
I am now playing on "Dwarven Heaven" or however you call it (this site posted, that has so many features). It is the first time i really recognise this problem. But now i know about it, i can see it in every game i play.
Everything runs fluent untill the miner removes the ramp, when it stops for like 1/10th or 1/5th of a second.

Is this common? Is there any way to solve/bypass  the problem? Turning caveins off didn't help.
Logged

Smew

  • Bay Watcher
  • I'll kill you with my bear face.
    • View Profile
    • Deep Games for Deep Gamers
Re: Carving ramps -> Framerate drops
« Reply #1 on: April 18, 2009, 06:22:19 pm »

It simply uses a lot of CPU power, I'm currently doing a project with ramps, it takes lots of patience.

Lesconrads

  • Bay Watcher
    • View Profile
Re: Carving ramps -> Framerate drops
« Reply #2 on: April 18, 2009, 06:32:11 pm »

Hmpf... back to channeling i think then.
It's just annoying as hell to get those "spikes" every second. *sad*

Or take a small site that leaves enough cpu-power for that stuff... but even on a small, fluidless map i get that. Strange that i didn't notice it before (maybe because i allready only had 15fps ^^).

Thanks for the answer.
Logged

Opirian

  • Bay Watcher
    • View Profile
Re: Carving ramps -> Framerate drops
« Reply #3 on: April 18, 2009, 07:29:21 pm »

Have you tried running 40d11? maybe that'll help =P
Logged
Don't go drowning your boss for telling you to work.

damn nobles management.
Minedstockades

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: Carving ramps -> Framerate drops
« Reply #4 on: April 18, 2009, 07:31:17 pm »

That's odd.  Is there a large area being made inaccessible by the removal?
Logged

Lesconrads

  • Bay Watcher
    • View Profile
Re: Carving ramps -> Framerate drops
« Reply #5 on: April 19, 2009, 04:39:07 am »

Hy :)

I am carving out a vertical shaft from the top of a mountain to some 5 zlvls down. It is roughly 16x16 squares big (being a weird shape). There is a natural wall around the shaft, which got inaccessible, but even now, on lower levels, it happenes.

I am on d11 btw... didn't look carefully enough  ::)

I am now testing with some smaller and/or fresh maps, if i can reproduce the lag. Maybe it's the general load on that dwarf-heaven (2 gcs, pages full of trogs, peacefull gobbos etc), that just needs a little bit more from the mining to really get stuck.
As it seems non-normal, i'll do some experiments.

Thank you for the help :)

edit: I've tested on a big map with lot of z and a brook. Mining out stuff works just fine, with a constant 80fps. As soon as removing ramps start, i get my beloved lag-spikes again.
On a really small map without much to do i could not reproduce it yet - test in progress.
edit2: So... i've now tested a big and a small map. Small one works with carving, big one gets me these delicious lags.

As stated below me, it just seems to be the load, the carving produces. My poor laptop isn't fast enough to calculate the paths AND run a big map. Kinda sad, because small maps are no fun at all :\
« Last Edit: April 19, 2009, 05:54:45 am by Lesconrads »
Logged

Opirian

  • Bay Watcher
    • View Profile
Re: Carving ramps -> Framerate drops
« Reply #6 on: April 19, 2009, 05:17:55 am »

I don't know what to say that is one of the oddest problems I have ever heard of... but from the sound of it, it seems like a common problem even though I haven't run into it and and I only have a 2.7 ghz processor in my DF comp.

Both 40d9 and 40d11 carving ramps doesn't even effect my gameplay... other than adding a ramp in an area.
Logged
Don't go drowning your boss for telling you to work.

damn nobles management.
Minedstockades

Jurph

  • Bay Watcher
  • Minister of Belt-fed Weaponry
    • View Profile
Re: Carving ramps -> Framerate drops
« Reply #7 on: April 19, 2009, 05:46:41 am »

It has to do with pathfinding.  When you carve a big swath of ramps (in order to hollow out vertical space safely), you turn lots and lots of squares into viable paths between Z-levels.  Then, as you get a bunch of them carved, individual ramps collapse or become non-viable.  You're creating and destroying lots of pathfinding options, so of course it's going to chug to a halt for a bit.
Logged
Dreambrother has my original hammer-shaped Great Hall.  Towerweak has taken the idea to the next level.

Zeg

  • Bay Watcher
    • View Profile
Re: Carving ramps -> Framerate drops
« Reply #8 on: April 19, 2009, 05:55:35 am »

Yeah, this happens all the time for me. I didn't really notice it until I started a project that required removing a whole lot of mountain layer by layer, where digging ramps was really the quickest way.

I think the worst spikes happen when you are making a ramp that isn't connected to any other square. As in, a pillar of rock, surrounded by ramps, getting mined out and turning into a (unusable) ramp isolated.

I think digging only in 1 or 2 tile 'strips' to ensure you don't get any isolated ramps may help. I say may, because I don't remember if I'd tried that. But even if it does, having such limits makes it less useful for clearing large areas.

Relatedly, after my initial experience of this problem, I thought I would use stairs instead. Carving down stairs into the surface of the area, then up/down stairs beneath, then remove the down stairs from below, then remove the up stairs, repeat. Its alot more designations and alot more tiles to mine. But I seem to remember that I still got lag spikes even that way.
Logged

Lesconrads

  • Bay Watcher
    • View Profile
Re: Carving ramps -> Framerate drops
« Reply #9 on: April 19, 2009, 06:41:20 am »

SSSSSSSSoooo... i think my tests are finished.
Big map, small map, much roaming stuff, very little roaming stuff etc. In general, i've tried how the game behaves depending on cpu-load.
And as you have said, it just seems to be a massive cpu-drain when i make changes to the possible pathways. When nearly nothing is to calculate, i can play with ~80fps and carve/remove (more the remove part actually) ramps/stairs as i wish.
On a big map with some stuff, high elevations and 4 miners going mad at the mountains, i get ... stop... motion... dwarfs... lagging... through... the... landscape until i stop the removing.

Thanks for the tip with trying stairs - but the effect is similar even though not THAT bad.
The 2.2GHz dual core in my laptop simply isn't powerful enough to handle it.

But i can play fine, as long as I don't make massive strip mining efforts or remove mountains.
Thanks for helping to find, that it's no but but normal behaviour. I can now avoid those things.  :)


edit: Just one last question... how do you destroy downstairs? Channeling them is an option, but i could just channel it out then. Cavein of cause - but thats something i can't do good on purpose xD. Else?

« Last Edit: April 19, 2009, 07:04:20 am by Lesconrads »
Logged

Exponent

  • Bay Watcher
    • View Profile
Re: Carving ramps -> Framerate drops
« Reply #10 on: April 19, 2009, 10:02:54 am »

edit: Just one last question... how do you destroy downstairs? Channeling them is an option, but i could just channel it out then. Cavein of cause - but thats something i can't do good on purpose xD. Else?

It turns out that channeling stairs is easier than channeling normal solid ground.  You can designate the entire level of stairs for channeling without worrying about the miners getting stuck, because they channel from below, not from above and to the side.  But I remember experiencing serious performance problems with stairs just as you have with ramps, so I don't know if it'd help much.
Logged