Bay 12 Games Forum

Please login or register.

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

Author Topic: One way hallways in .34?  (Read 4637 times)

expwnent

  • Bay Watcher
    • View Profile
Re: One way hallways in .34?
« Reply #15 on: August 16, 2012, 12:07:49 pm »

Be aware of FPS problems. Pathfinding will go faster if you set the normal traffic cost to 1. The reason has to do with the A* algorithm. Without going into too much detail, A* uses a distance heuristic to estimate path costs between tiles. The heuristic must always give a lower bound on the actual path cost for A* to be correct. The higher the heuristic is without going over, the faster A* will run. I speculate that the heuristic is some variation on manhattan/euclidean distance multiplied by the lowest tile cost.

Basically, it's better to have 3-wide corridors with weight >1 in the middle and weight 1 on the outsides than it is to have weight 2 on the sides and weight 5 in the middle.
Logged

Triaxx2

  • Bay Watcher
    • View Profile
Re: One way hallways in .34?
« Reply #16 on: August 16, 2012, 12:28:43 pm »

Depends also on the curvature of the path. For example a 3-wide path with a series of sharp bends will actually have an optimal path that is more elongated than might seem practical. So if you have two sharp turns, down, left down, the shortest path actually shifts across down the middle of the pathway. It's one of those oddities that WILL cause injuries if you send a mine cart down the middle of the path. If you have to have it, build several pits. Three tile long pot holes with one floor over the top. The floor can be marked for high traffic, and dwarves should use those to cross while the mine carts just bounce underneath and pop up on the other side. Me, I just don't bother to run mine carts through busy hallways.

You might also alleviate hauling issues using minecarts as well.
Logged

Hyndis

  • Bay Watcher
    • View Profile
Re: One way hallways in .34?
« Reply #17 on: August 16, 2012, 01:06:31 pm »

If you're pushing or riding minecarts then yes safety is a big concern. Guided minecarts are completely safe. They won't run anyone over or go flying out of control.
Logged

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: One way hallways in .34?
« Reply #18 on: August 16, 2012, 03:26:26 pm »

Guided minecarts can cause injuries, presumably in cases where there isn't enough space to move out of the way. It may be necessary for the route to be ramped and enclosed for this to be a significant risk, but so far my science is limited to making irritated observations.
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.

Hyndis

  • Bay Watcher
    • View Profile
Re: One way hallways in .34?
« Reply #19 on: August 16, 2012, 05:06:27 pm »

Guided minecarts can cause injuries, presumably in cases where there isn't enough space to move out of the way. It may be necessary for the route to be ramped and enclosed for this to be a significant risk, but so far my science is limited to making irritated observations.

I've only, ever, had 1 injury due to guided mine carts. This is after having 100+ dwarves crowded around a mine of guided minecarts.

The only time I had an injury happen was when the minecart guide was arrested while guiding a minecart, and the guide was on a ramp at the time of being arrested so it went out of control.

While I didn't witness it I did put the pieces of the crime scene back together after some research, and presumably what happened is the dwarf was pulled away from the minecart, so the minecart became stationary. If this happened on flat ground then no big deal. But it happened on a ramp, which then caused the minecart to gain speed and turn ballistic.
Logged

GreatWyrmGold

  • Bay Watcher
  • Sane, by the local standards.
    • View Profile
Re: One way hallways in .34?
« Reply #20 on: August 16, 2012, 05:26:49 pm »

That's an amusing image.
Logged
Sig
Are you a GM with players who haven't posted? TheDelinquent Players Help will have Bay12 give you an action!
[GreatWyrmGold] gets a little crown. May it forever be his mark of Cain; let no one argue pointless subjects with him lest they receive the same.

doublestrafe

  • Bay Watcher
  • [PONY_DEPENDENT]
    • View Profile
Re: One way hallways in .34?
« Reply #21 on: August 16, 2012, 06:05:25 pm »

Guided minecarts can cause injuries, presumably in cases where there isn't enough space to move out of the way. It may be necessary for the route to be ramped and enclosed for this to be a significant risk, but so far my science is limited to making irritated observations.

I've only, ever, had 1 injury due to guided mine carts. This is after having 100+ dwarves crowded around a mine of guided minecarts.

The only time I had an injury happen was when the minecart guide was arrested while guiding a minecart, and the guide was on a ramp at the time of being arrested so it went out of control.

While I didn't witness it I did put the pieces of the crime scene back together after some research, and presumably what happened is the dwarf was pulled away from the minecart, so the minecart became stationary. If this happened on flat ground then no big deal. But it happened on a ramp, which then caused the minecart to gain speed and turn ballistic.
Thank you for this. I just built a 40 z-level ramp that doubles as a railway and a hallway, figuring that all the carts will be guided, so no fun can come of this, right?

Time to figure out how friction works.
Logged

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: One way hallways in .34?
« Reply #22 on: August 16, 2012, 06:09:07 pm »

I recently had a save that I kept scumming because I was trying to mod the game while it was in progress, and more often than not I'd have a horrible cart accident on level ~-100 a couple of weeks after the save started. It would frequently involve multiple dwarves, with fatalities being common (10 - 25%?). I wanted to examine it more closely after I'd finished with the modding, but I lost it to letting the game roll over to the next Spring and its autosave. On the plus side, the conditions should be fairly easy to replicate by burrowing the dwarves in a section of central ramp track and ordering them to push carts up and down it constantly.
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.

Hyndis

  • Bay Watcher
    • View Profile
Re: One way hallways in .34?
« Reply #23 on: August 16, 2012, 06:50:07 pm »

Guided minecarts can cause injuries, presumably in cases where there isn't enough space to move out of the way. It may be necessary for the route to be ramped and enclosed for this to be a significant risk, but so far my science is limited to making irritated observations.

I've only, ever, had 1 injury due to guided mine carts. This is after having 100+ dwarves crowded around a mine of guided minecarts.

The only time I had an injury happen was when the minecart guide was arrested while guiding a minecart, and the guide was on a ramp at the time of being arrested so it went out of control.

While I didn't witness it I did put the pieces of the crime scene back together after some research, and presumably what happened is the dwarf was pulled away from the minecart, so the minecart became stationary. If this happened on flat ground then no big deal. But it happened on a ramp, which then caused the minecart to gain speed and turn ballistic.
Thank you for this. I just built a 40 z-level ramp that doubles as a railway and a hallway, figuring that all the carts will be guided, so no fun can come of this, right?

Time to figure out how friction works.

You could presumably also have accidentally ballistic mine carts if the dwarf stops the job for any reason, be it having a baby, getting arrested, or being scared by a hostile creature. Going outside of a burrow may also trigger this if they're guiding the cart outside of the burrow.

On flat ground its fine, the cart just sits there and does nothing, but if you have an unattended cart on a ramp, then it goes zoom.

An unattended cart on a 40 level ramp is going to cause some serious damage.  :o
Logged

doublestrafe

  • Bay Watcher
  • [PONY_DEPENDENT]
    • View Profile
Re: One way hallways in .34?
« Reply #24 on: August 16, 2012, 06:57:03 pm »

An unattended cart on a 40 level ramp is going to cause some serious damage.  :o

Did I mention it's carrying candy weapons and steel trap components to the upper levels?
« Last Edit: August 16, 2012, 07:03:19 pm by doublestrafe »
Logged

Triaxx2

  • Bay Watcher
    • View Profile
Re: One way hallways in .34?
« Reply #25 on: August 16, 2012, 07:44:06 pm »

I use very long Minecart routes, and ensure they're restricted. I also provide high traffic stairs as a primary route.
Logged

nbp

  • Bay Watcher
    • View Profile
Re: One way hallways in .34?
« Reply #26 on: December 06, 2012, 09:40:22 pm »

Hi all,

I've been thinking a lot about this and am stuck... but it would be really nice if it could work. A pair of one-way halls could carry arbitrary traffic without jamming up, where even three-wide halls have issues under a burst of hauling.

I saw the bug/exploit for .40d on the wiki, but I think that's since been fixed. Is there anything more recent?

I would _love_ to have a way to force one-way pathing.  I often want to allow creatures into my fort, be they liasons, hordes of the undead, invading armies of goblins, or almost anything else.  But any time I leave a valid path between the inside of the fort and the outside, it's just a matter of time until some idiot decides that he needs to go fetch a sock or something from the dangerous, zombie and goblin infested wasteland outside.  Even with everyone restricted to a civilian burrow, random recruits freshly added to the military wander outside.  Even when I forbid everything, some idiot merchant quietly drops a set of clothes behind a tree in a valley somewhere when I'm not looking, just to screw everything up.  If I could set up a one way path into the fort that would act as an entrance, but not an exit, I'd be so much happier.
Logged

i2amroy

  • Bay Watcher
  • Cats, ruling the world one dwarf at a time
    • View Profile
Re: One way hallways in .34?
« Reply #27 on: December 07, 2012, 01:50:35 am »

Sadly there aren't really any good/efficient ways of making 1-way corridors right now other then has been pointed out already. The best way right now is to use a hatch+pressure plate, so that anything approaching from one side triggers the plate and can't get through (a similar method to that used in a goblin grinder).

I would _love_ to have a way to force one-way pathing.  I often want to allow creatures into my fort, be they liasons, hordes of the undead, invading armies of goblins, or almost anything else.  But any time I leave a valid path between the inside of the fort and the outside, it's just a matter of time until some idiot decides that he needs to go fetch a sock or something from the dangerous, zombie and goblin infested wasteland outside.  Even with everyone restricted to a civilian burrow, random recruits freshly added to the military wander outside.  Even when I forbid everything, some idiot merchant quietly drops a set of clothes behind a tree in a valley somewhere when I'm not looking, just to screw everything up.  If I could set up a one way path into the fort that would act as an entrance, but not an exit, I'd be so much happier.
Make an airlock at your entrance (so have two raising bridges with a fair amount of space between them). You can then put either the trade depot for traders or harmless kittens to lure sieges. Then you just open the outer layer without opening the inner one, wait until whatever you want is inside the the outer layer, then close the outer and open the inner. It allows you to easily control what gets in without there ever being a complete path to the outside that your dwarves can get out through.
Logged
Quote from: PTTG
It would be brutally difficult and probably won't work. In other words, it's absolutely dwarven!
Cataclysm: Dark Days Ahead - A fun zombie survival rougelike that I'm dev-ing for.
Re: One way hallways in .34?
« Reply #28 on: December 07, 2012, 07:09:42 am »

The most efficient hallways are those that are 3 wide, and then set a HIGH TRAFFIC path in the center. Everyone will take the middle path until they come to another dwarf, then one will move to the left or right and neither will be slowed from it.

Stairways work the same way. I usually make them in an X pattern of 5, with a 5x5 room around around them each floor, so they can shift to a different staircase if they run into someone.

If you want the one-way halls for more of a defensive thing, i2amroy has an interesting idea that would work perfectly, but it would still be inefficient for pathing dwarves around.
« Last Edit: December 07, 2012, 07:11:17 am by TheCoolSideofthePIllow »
Logged

hudders

  • Bay Watcher
  • Excuse me while I waffle
    • View Profile
    • Doodle Circus
Re: One way hallways in .34?
« Reply #29 on: December 07, 2012, 07:12:46 am »

How about having a down staircase, a short tunnel one z-level below the corridor, then an up staircase on the other end? Obviously this wont work for things that can't utilise stairs, (e.g. caravans), but it should work for Dwarves, shouldn't it?
Logged
Pages: 1 [2] 3