Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4

Author Topic: Hallways replaced with up/down staircases  (Read 5054 times)

cog disso

  • Bay Watcher
  • Current Fortress: Hatchetminds
    • View Profile
Re: Hallways replaced with up/down staircases
« Reply #15 on: December 12, 2010, 06:33:16 am »

You're doomed the second a syndrome FB gets into the fort, though. It would spread all the way through.
Logged
Urist McShrodinger likes unobservable properties for their haunting implications.

Urist Imiknorris

  • Bay Watcher
  • In the flesh, on the phone and in your account...
    • View Profile
Re: Hallways replaced with up/down staircases
« Reply #16 on: December 12, 2010, 09:55:23 am »

[WALKING_SPREADS_SPATTER_DWF:NO]
Logged
Quote from: LordSlowpoke
I don't know how it works. It does.
Quote from: Jim Groovester
YOU CANT NOT HAVE SUSPECTS IN A GAME OF MAFIA

ITS THE WHOLE POINT OF THE GAME
Quote from: Cheeetar
If Tiruin redirected the lynch, then this means that, and... the Illuminati! Of course!

Pilsu

  • Bay Watcher
    • View Profile
Re: Hallways replaced with up/down staircases
« Reply #17 on: December 12, 2010, 11:34:06 am »

Spoiler (click to show/hide)

If it doesn't hurt your fps, it'll at least hurt your brain as you try to figure out how it'd look like.
Logged

TolyK

  • Bay Watcher
  • Nowan Ilfideme
    • View Profile
Re: Hallways replaced with up/down staircases
« Reply #18 on: December 12, 2010, 12:03:46 pm »

to deal with falling idiots, use this:
Code: [Select]
#VVVVV____VVVVV#
#^^^^^VVVV^^^^^#
#VVVVV^^^^VVVVV#
#^^^^^VVVV^^^^^#
#_____^^^^_____#
where #-wall, V-down stair, ^-up stair, _-floor
therefore they will only fall 1 z-level, ending up in temporary stunning.

try it out for !!science!!
Logged
My Mafia Stats
just do whatevery tolyK and blame it as a bastard mod
Shakerag: Who are you personally suspicious of?
At this point?  TolyK.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Hallways replaced with up/down staircases
« Reply #19 on: December 12, 2010, 12:07:21 pm »

Go to d_init.txt

Quote
The format is (PATH_COST:<high>:<normal>:<low>:<restricted>).
[PATH_COST:1:2:5:25]

If you change the 2 for normal to a 1:
[PATH_COST:1:1:5:25]
you can get improved fps via pathfinding calculations at the cost of not being able to use high traffic designations.

What happens with a normal path cost of 2 is that the pathfinding function is willing to search 1 tile in the wrong direction for every 2-3 tiles in the correct direction. This causes it to flood staircases and rooms with even a trivial pathfinding search. It thinks that a faster path than a straight-line exists somewhere, which would only be true if you connected the origin and destination with a high traffic zone.

What happens with a normal path cost of 1, especially if you use stairs instead of halls, is that the pathfinding function "knows" that a straight-line path is the shortest, barring obstacles, and doesn't waste time exploring alternate routes.

Dwarf Fortress apparently uses a modified A* pathing function with a manhattan distance heuristic function, and saved accessible/inaccessible states for tiles.

INSANEcyborg

  • Bay Watcher
    • View Profile
Re: Hallways replaced with up/down staircases
« Reply #20 on: December 12, 2010, 12:30:09 pm »

My theory is that too many stairs creates too many possible paths.  For example, it would have to pick the best path between 1 up 5 over, OR 1 over 1 up 4 over, OR 2 over 1 up 3 over, and so on.  I never got around to testing that though.
Logged

Xenos

  • Bay Watcher
  • [DWARFINEER]
    • View Profile
Re: Hallways replaced with up/down staircases
« Reply #21 on: December 12, 2010, 12:40:11 pm »

while it would create more new paths, it would also be more efficient with each path. so instead of "go down this hallway, up these stairs down that hallway, around that corner down those stairs, through that door, crap its locked"  it would be go over and up, crap its locked where now?
Logged
This is a useful feature..and this is DF.. so im gonna assume its bugged
That's what cages and minecart shotguns are for!  We don't need to control them.  We just need to aim them.
[DWARFINEERING]

TolyK

  • Bay Watcher
  • Nowan Ilfideme
    • View Profile
Re: Hallways replaced with up/down staircases
« Reply #22 on: December 12, 2010, 12:40:27 pm »

try if for !!science!!
Logged
My Mafia Stats
just do whatevery tolyK and blame it as a bastard mod
Shakerag: Who are you personally suspicious of?
At this point?  TolyK.

Xenos

  • Bay Watcher
  • [DWARFINEER]
    • View Profile
Re: Hallways replaced with up/down staircases
« Reply #23 on: December 12, 2010, 12:45:38 pm »

try if for !!science!!
all of my recent science !!SCIENCE!! is to test some theories i have about wells.  (if you want more details, i can explain in depth more)
Logged
This is a useful feature..and this is DF.. so im gonna assume its bugged
That's what cages and minecart shotguns are for!  We don't need to control them.  We just need to aim them.
[DWARFINEERING]

TolyK

  • Bay Watcher
  • Nowan Ilfideme
    • View Profile
Re: Hallways replaced with up/down staircases
« Reply #24 on: December 12, 2010, 12:54:36 pm »

please continue!
(btw I meant you and OP too)
Logged
My Mafia Stats
just do whatevery tolyK and blame it as a bastard mod
Shakerag: Who are you personally suspicious of?
At this point?  TolyK.

Earthquake Damage

  • Bay Watcher
    • View Profile
Re: Hallways replaced with up/down staircases
« Reply #25 on: December 12, 2010, 01:19:22 pm »

Go to d_init.txt

Quote
The format is (PATH_COST:<high>:<normal>:<low>:<restricted>).
[PATH_COST:1:2:5:25]

If you change the 2 for normal to a 1:
[PATH_COST:1:1:5:25]
you can get improved fps via pathfinding calculations at the cost of not being able to use high traffic designations.

What happens with a normal path cost of 2 is that the pathfinding function is willing to search 1 tile in the wrong direction for every 2-3 tiles in the correct direction. This causes it to flood staircases and rooms with even a trivial pathfinding search. It thinks that a faster path than a straight-line exists somewhere, which would only be true if you connected the origin and destination with a high traffic zone.

What happens with a normal path cost of 1, especially if you use stairs instead of halls, is that the pathfinding function "knows" that a straight-line path is the shortest, barring obstacles, and doesn't waste time exploring alternate routes.

Dwarf Fortress apparently uses a modified A* pathing function with a manhattan distance heuristic function, and saved accessible/inaccessible states for tiles.

Mein gott!  I just realized something:  if you set the high traffic cost to zero, wouldn't that make dwarves always use the high traffic tiles when available, no matter how silly the path?  I wonder if this could be used for dastardly purposes.  Do things other than dwarves respect traffic designations?  We could potentially force siegers to waste time zigging and zagging on their way to the fort.

The risk:  Crashing the game because pathfinding keeps trying to follow a high-traffic loop because the next tile in the loop always costs less than a step in the right direction.
Logged

Trouserman

  • Bay Watcher
    • View Profile
Re: Hallways replaced with up/down staircases
« Reply #26 on: December 12, 2010, 01:20:26 pm »

Go to d_init.txt

Quote
The format is (PATH_COST:<high>:<normal>:<low>:<restricted>).
[PATH_COST:1:2:5:25]

If you change the 2 for normal to a 1:
[PATH_COST:1:1:5:25]
you can get improved fps via pathfinding calculations at the cost of not being able to use high traffic designations.

What happens with a normal path cost of 2 is that the pathfinding function is willing to search 1 tile in the wrong direction for every 2-3 tiles in the correct direction.

Nice observation.  I don't bother making high traffic designations anyway, so I'll definitely be doing this.  It looks appropriate to reduce the low traffic cost as well, to keep it in roughly the same proportion to normal priority, 1:1:2:25 or 1:1:3:25.  I'll keep restricted cost high, since I sometimes find it not quite restrictive enough.

Quote
Dwarf Fortress apparently uses a modified A* pathing function with a manhattan distance heuristic function, and saved accessible/inaccessible states for tiles.

Manhattan, really?  Doesn't DF use a Chebyshev distance, where the diagonals have equal cost to movement along the axes?  A Manhattan heuristic would overestimate the distances, in which case A* wouldn't necessarily find the shortest path.
Logged

TolyK

  • Bay Watcher
  • Nowan Ilfideme
    • View Profile
Re: Hallways replaced with up/down staircases
« Reply #27 on: December 12, 2010, 01:21:43 pm »

I'll be trying the 0 for high to force movement. Thanks!
Logged
My Mafia Stats
just do whatevery tolyK and blame it as a bastard mod
Shakerag: Who are you personally suspicious of?
At this point?  TolyK.

Earthquake Damage

  • Bay Watcher
    • View Profile
Re: Hallways replaced with up/down staircases
« Reply #28 on: December 12, 2010, 01:22:48 pm »

I'll be trying the 0 for high to force movement. Thanks!

You do so at your own risk...  for science!
Logged

TolyK

  • Bay Watcher
  • Nowan Ilfideme
    • View Profile
Re: Hallways replaced with up/down staircases
« Reply #29 on: December 12, 2010, 01:30:37 pm »

results: DAMN IT DOESN'T WORK! I can't set it below 1  :-[

well, TOADY PLZ LET US CHOOSE ANY VALUE, INCLUDING NEGAITVES!!!!!
Logged
My Mafia Stats
just do whatevery tolyK and blame it as a bastard mod
Shakerag: Who are you personally suspicious of?
At this point?  TolyK.
Pages: 1 [2] 3 4