stair placement

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wobbly
    Prophet
    • May 2012
    • 2629

    stair placement

    All the down stairs on the level:



    Trouble is, that as far as the stair placement function is concerned that room is 21 great potential stair spots. It's similar with other special rooms
  • wobbly
    Prophet
    • May 2012
    • 2629

    #2
    Ok here's a suggestion.
    • Keep the same criteria for a "good" stair spot.
    • When checking a spot for good, check the adjacent wall spots, if you can create a good spot by carving out the wall tile, place there.
    • Maybe stop it from carving a spot near a monster pit, maybe not, depends how cruel you feel.


    Edit: Maybe best to only carve in a corridor? Or you can get trickier with the carving:

    Code:
      #############
      #
    ###
    #>+
    ###
      #
      #############
    and

    Code:
    #############
    #>#
    #
    ###
      #
      ###########
    Last edited by wobbly; June 4, 2023, 11:27.

    Comment

    • wobbly
      Prophet
      • May 2012
      • 2629

      #3
      Code:
      ###
      .1.
      ###
      Code:
       ### 
       .1. 
       234 
       567 
       890
      Code:
       ### 
       .1. 
       #.# 
       #># 
       ###
      So if 1 is a corridor spot (square_suits_stairs_ok) and 2 to 0 are all wall tiles....

      Comment

      • backwardsEric
        Knight
        • Aug 2019
        • 527

        #4
        The capability is there (because of persistent levels) to enforce a minimum distance between stairs. It would be very easy to turn that on for non-persistent modified, classic, moria, and lair levels (also caverns, but they have no rooms) to limit the clustering of staircases in a room. If you want to try it yourself, look at handle_level_stairs() in gen-cave.c, change the value after the colon for the "minsep = (persistent) ? 4 : 0" line (in the latest code that's line of 959 of gen-cave.c), and recompile.

        Another idea, requiring little modification to the code, would be to require more adjacent walls for a potential staircase location in alloc_stairs() if that location is in a room. That would tend to push the staircases to dead-ends in corridors or to the middle of corridors.

        Comment

        • PowerDiver
          Prophet
          • Mar 2008
          • 2820

          #5
          I've always found the clumping to be silly. Is there any reason not to simply enforce a minimum distance between stairs of, say, 1/4 the diameter of the level?

          Comment

          • wobbly
            Prophet
            • May 2012
            • 2629

            #6
            Yeah sounds like enforcing minimum distance is easy, so go with that?

            I'd also prefer something based on level size rather then a constant. Allows it to adapt to small or huge levels.

            Comment

            Working...
            😀
            😂
            🥰
            😘
            🤢
            😎
            😞
            😡
            👍
            👎