Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Ramps vs. Stairs  (Read 4715 times)

JarinArenos

  • Bay Watcher
    • View Profile
Ramps vs. Stairs
« on: January 13, 2011, 05:02:26 pm »

Okay, I've seen it mentioned a number of times that ramps work better than, say, a 3x3 shaft of up/down stairs when it comes to pathing issues. And indeed, most people talking about large z-level pathways mention spiral rampways. So here's my question(s)

1. What layout works best for a primary central spiral, with the assumption that most of the fort's vertical traffic will use this?

I've used:
Code: [Select]
L1       L2       L3       L4
....^    ^^^^      vvvv    v....
....^    ....v    ^....    v....
....^    ....v    ^....    v....
....^    ....v    ^....    v....
vvvv     ....v    ^....     ^^^^
If that makes sense, or a 3x3 variant (instead of 4x4), but either way, it significantly increases vertical travel distance. Instead of 50 z-levels being 50 steps, it's now more than double that. Is there a more efficient way to do this? Am I missing something critical?

2. How much of a pathing slowdown are up/down staircases? I mean, I understand the basic issue being 3d pathing instead of 2d, but is it really that bad if the shaft is only 2x2 or 3x3?
Logged

sir_laser

  • Bay Watcher
  • It's lucky to be smart, but smarter to be lucky.
    • View Profile
Re: Ramps vs. Stairs
« Reply #1 on: January 13, 2011, 06:09:36 pm »

Maybe I'm just not experienced, but I've never encountered an issue in which a 3x3 staircase was not enough, especially if you have certain dedicated stairwells (like a direct stair to your forge from the stockpiles or meeting room, blocked off on every other z-level but these two).

Ramps move both a vertical and horizontal distance, while stairs only move a vertical distance, maybe that's what your problem is.
Logged
"That is the most amazing thing I have ever read ever."
- Friend's reaction to Bronzemurder

JarinArenos

  • Bay Watcher
    • View Profile
Re: Ramps vs. Stairs
« Reply #2 on: January 13, 2011, 06:26:55 pm »

Maybe I'm just not experienced, but I've never encountered an issue in which a 3x3 staircase was not enough, especially if you have certain dedicated stairwells (like a direct stair to your forge from the stockpiles or meeting room, blocked off on every other z-level but these two).

Ramps move both a vertical and horizontal distance, while stairs only move a vertical distance, maybe that's what your problem is.
Think you might have overlooked the question here. By all intents and purposes, a 3x3 staircase should be the optimum. However, there's supposedly pathing issues with them that slow down forts; especially later game, when you're fighting against FPS more than goblins and FBs.
Logged

shlorf

  • Bay Watcher
    • View Profile
Re: Ramps vs. Stairs
« Reply #3 on: January 13, 2011, 06:40:32 pm »

The singular ramp design is probably the most fps efficient, I would suggest making it 3 or even only 2 tiles wide (works fine for me).
The following more symmetrically pleasing design is what most people seem to use tho:

Code: [Select]
__V__
__V__
^^W^^
__V__
__V__
rotate 90° on next z-level
It has the advantage of looping on itself after 2 levels instead of 4 and you can connect in all directions easier, but it opens up a lot more paths to calculate.
There was a thread about this before, it had exact distances.
I just realized this is missing some walls, don't build it like this but I gotta go to bed now and that design is also on the wiki iirc.
Logged

tolkafox

  • Bay Watcher
  • Capitalism, ho!
    • View Profile
    • Phantasm
Re: Ramps vs. Stairs
« Reply #4 on: January 13, 2011, 06:52:56 pm »

FYI I don't use centralized stairways except for the first five Z levels, then I branch stairways off every which way and what and control them by restricting paths to dead ends. Not sure if that will give you any ideas or not :/ Also, dwarves move horizontal and vertical on ramps in the same time it takes them to move one space.

If I remember correctly, it was more optimum like so:

f1       f2     f3   f4
. . ^   . . .      . . .    ^^.
. . ^   . . .     ^ . .    . . .
. . .    . ^^    ^ . .    . . .
Or something like that, and then just alternate. It either takes the same time as stairs or is faster, one or the other :/

Edit: Sorry I fail as an artist. It was spiral not straight up O.o
« Last Edit: January 13, 2011, 07:03:58 pm by tolkafox »
Logged
It was a miracle of rare device, A sunny pleasure-dome with caves of ice!

JarinArenos

  • Bay Watcher
    • View Profile
Re: Ramps vs. Stairs
« Reply #5 on: January 13, 2011, 07:01:07 pm »

There was a thread about this before, it had exact distances.
I tried looking for such, but search has failed me.
Logged

ext0l

  • Bay Watcher
    • View Profile
Re: Ramps vs. Stairs
« Reply #6 on: January 13, 2011, 08:05:05 pm »

Ramps may or may not increase FPS. There is little evidence that suggests one is better than the other.

Also, doing a search for 'spiral ramp' turns out many more threads. Many.
Logged

JarinArenos

  • Bay Watcher
    • View Profile
Re: Ramps vs. Stairs
« Reply #7 on: January 13, 2011, 08:40:39 pm »

So it does. Much appreciated.

Alright, so that looks like it's not going to be much of an issue either way. Not enough to really judge pathfinding comparisons, anyway.
Logged

tolkafox

  • Bay Watcher
  • Capitalism, ho!
    • View Profile
    • Phantasm
Re: Ramps vs. Stairs
« Reply #8 on: January 13, 2011, 09:01:43 pm »

Ramps may or may not increase FPS. There is little evidence that suggests one is better than the other.

Also, doing a search for 'spiral ramp' turns out many more threads. Many.

This looks like it is in dire need of !!SCIENCE!!

If it helps, I've already looked through 1-20 of spiral ramps search and only found these:
http://www.bay12forums.com/smf/index.php?topic=35931.msg1843196#msg1843196
http://www.bay12forums.com/smf/index.php?topic=74683.msg1865179#msg1865179
http://www.bay12forums.com/smf/index.php?topic=71990.msg1761479#msg1761479
Only the first one looks helpful though.

Also, do one way ramps still work?
Logged
It was a miracle of rare device, A sunny pleasure-dome with caves of ice!

mrbaggins

  • Bay Watcher
    • View Profile
Re: Ramps vs. Stairs
« Reply #9 on: January 13, 2011, 10:18:33 pm »

What we need is a one way door or the ability to designate floors or roads as one way tiles brush all hallways can be one tile wide. You'd just need two (wall separation is optional)
Logged

shlorf

  • Bay Watcher
    • View Profile
Re: Ramps vs. Stairs
« Reply #10 on: January 14, 2011, 03:57:28 am »

Yeah if the pathing designation had a feature for oneway passages you could heavily optimize and cut down the calculations. It would be a bitch to set up for big forts tho.
Logged

brucemo

  • Bay Watcher
    • View Profile
Re: Ramps vs. Stairs
« Reply #11 on: January 14, 2011, 06:48:44 am »

I heard that stairs were death to framerate, and ramps make your forts run fast as lightning, so I made a fort that was all ramps and I couldn't tell the difference.

Having said that, I like ramps.  There are lots of sane ramp layouts.  Here's one:

Code: [Select]
WWWWWWWWWWWWWWWWWWWWWWWWW
W+++++++++++W+++++++++++W W = Wall
W+++++++++++W+++++++++++W + = Floor
W+++++++++++W+++++++++++W % = Door
W+++++++++++W+++++++++++W ^ = Up ramp
W+++++++++++W+++++++++++W v = Down ramp
W+++++++++++%+++++++++++W # = Floor, or grate for waterfall
W+++++++++++%+++++++++++W
W+++++++++++W+++++++++++W Other Z levels are this rotated 90, 180, or 270 degrees
W++++++++W%%WW++++++++++W
W++++++++%++vW++++++++++W
W++++++++%++vW++++++++++W
WWWWWW%%WW^^#WWWW%%WWWWWW
W++++++++WWWWW++++++++++W
W+++++++++++W+++++++++++W
W+++++++++++W+++++++++++W
W+++++++++++W+++++++++++W
W+++++++++++%+++++++++++W
W+++++++++++%+++++++++++W
W+++++++++++W+++++++++++W
W+++++++++++W+++++++++++W
W+++++++++++W+++++++++++W
W+++++++++++W+++++++++++W
W+++++++++++W+++++++++++W
WWWWWWWWWWWWWWWWWWWWWWWWW
Logged

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: Ramps vs. Stairs
« Reply #12 on: January 14, 2011, 08:33:19 am »

One-way ramps don't work any more because a ramp built with a floor above it now registers correctly when the floor is removed.

Here's the design I'm using at the moment:

Code: [Select]
       ######
       #^+++###
       #^+++++##
       #^++++++#
       #^++++++##
       #^+++++++#
       #^+++++++#
########++++++++#
#vvvvvv+++vvvvvv#
#++++++++########
#+++++++^#
#+++++++^#
##++++++^#
 #++++++^#
 ##+++++^#
  ###+++^#
    ######

Rotate 90 degrees for the next level.


Travel time is presumably 2x the number of levels, as dwarves appear for two tiles per level. If the ramps were to be extended towards the centre, then a single dwarf moving up and down would appear on one tile per level, same as a vertical staircase. Adding other dwarves complicates things somewhat, as one will always have to move away from the quickest path in order to avoid other dwarves, but while this will definitely affect travel time I have no idea how the game uses resources when doing the 'move out the way' repathing. There's a definite slowdown when multiple dwarves try to path through the same area (on the same z-level) even if they can move freely once they actually get to the narrow point, but I don't know if stairs and ramps have different effects.
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.