Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: One way pet accessible door setting, smarter pet owners.  (Read 1917 times)

BoogieMan

  • Bay Watcher
  • Hi
    • View Profile
One way pet accessible door setting, smarter pet owners.
« on: August 22, 2011, 08:28:00 am »

One of my biggest annoyances in DF is pets constantly getting into areas I don't want them to, from wasting pathfinding resources to getting killed in training exercises or getting stuck outside and gutted by Goblins. If making pet inaccessible doors actually entirely inaccessible to pets isn't an option, I'd love a setting on the doors that only lets pets go through the door in a specific direction so if they get though at least they can get back in on their own, reducing tedious micromanaging of getting them back in without letting others get out.

Second, I'd like to see Dwarves with dangerous jobs (soldiers especially) have an option to send their non combat pets to a meeting area when they are on duty. This could be global setting you could toggle somewhere..
Logged
(╯°□°)╯︵ ┻━┻ BoogieMan, Forumscrub cancels tantrum: Seeking Dr. Pepper

Bohandas

  • Bay Watcher
  • Discordia Vobis Com Et Cum Spiritum
    • View Profile
Re: One way pet accessible door setting, smarter pet owners.
« Reply #1 on: August 22, 2011, 10:58:40 am »

One way door access in general is a good idea, whether for pets or people. (Although, realistically, unless a door is specifically built to be one way (which should be an option if this kind of thing is implemented) it should be quite fallible (although not totally ineffective) in restricting movement to only one direction)
Logged
NEW Petition to stop the anti-consumer, anti-worker, Trans-Pacific Partnership agreement
What is TPP
----------------------
Remember, no one can tell you who you are except an emotionally unattached outside observer making quantifiable measurements.
----------------------
Έπαινος Ερις

squeakyReaper

  • Bay Watcher
  • Legendary Cheese maker
    • View Profile
Re: One way pet accessible door setting, smarter pet owners.
« Reply #2 on: August 22, 2011, 12:12:25 pm »

Could be seen as a door with a pet flap on the bottom.  The flap only opens one way for the pet, or something.  Alternatively, a door with no pull handle?
Logged

Wimopy

  • Bay Watcher
    • View Profile
Re: One way pet accessible door setting, smarter pet owners.
« Reply #3 on: August 22, 2011, 05:08:15 pm »

Just a quick question, how do animals open dwarven doors anyway? I'll share my ideas after I've learnt that.  :o
Logged
Now updating the Monster Hunter Universe mod
Current Version: 0.4.95b - Updated June 17, 2015
New Thread
Download
Old Thread

squeakyReaper

  • Bay Watcher
  • Legendary Cheese maker
    • View Profile
Re: One way pet accessible door setting, smarter pet owners.
« Reply #4 on: August 22, 2011, 05:50:07 pm »

Just a quick question, how do animals open dwarven doors anyway? I'll share my ideas after I've learnt that.  :o
Odds are, doors are just huge blocks that people lift up, go under, then put back down.  Maybe they're attached to a wall with a hinge, then you just push them open like saloon doors.
Logged

Jay

  • Bay Watcher
  • ☼Not Dead Yet☼
    • View Profile
Re: One way pet accessible door setting, smarter pet owners.
« Reply #5 on: August 26, 2011, 01:01:37 pm »

I think one-way paths break A* or something.
I remember hearing something to that extent, at least.

Other notable flaw in A*:
-Paths that cost the same (IE entrance perfectly bisects a segment of a square, exit perfectly bisects the opposite segment -- going either way around the square has the same pathing cost) create loops in the code (hence you see a bigger impact on FPS if you do something like that).
Logged
Mishimanriz: Histories of Pegasi and Dictionaries

Bohandas

  • Bay Watcher
  • Discordia Vobis Com Et Cum Spiritum
    • View Profile
Re: One way pet accessible door setting, smarter pet owners.
« Reply #6 on: August 26, 2011, 02:59:17 pm »

I think one-way paths break A* or something.
I remember hearing something to that extent, at least.

Other notable flaw in A*:
-Paths that cost the same (IE entrance perfectly bisects a segment of a square, exit perfectly bisects the opposite segment -- going either way around the square has the same pathing cost) create loops in the code (hence you see a bigger impact on FPS if you do something like that).

What is "A*"? I can't google search for the meaning because its only two characters long and one of them is an asterisk.
Logged
NEW Petition to stop the anti-consumer, anti-worker, Trans-Pacific Partnership agreement
What is TPP
----------------------
Remember, no one can tell you who you are except an emotionally unattached outside observer making quantifiable measurements.
----------------------
Έπαινος Ερις

irmo

  • Bay Watcher
    • View Profile
Re: One way pet accessible door setting, smarter pet owners.
« Reply #7 on: August 26, 2011, 03:56:59 pm »

What is "A*"? I can't google search for the meaning because its only two characters long and one of them is an asterisk.

A simple, accurate pathfinding algorithm used in the game.

One-way links don't actually break A* because A* will never try to follow the same link in both directions in the same path (because that's never optimal). You just ignore the existence of the door if you're on the wrong side, and it works.

Here's the problem: The worst-case scenario for A* is trying to find a path that doesn't exist (it has to try every possible path just to be sure...), so DF guards against that by keeping track of zones of mutually reachable tiles. One-way doors confuse the hell out of that. If you have a room with one door that only leads out, and you start flood-filling from outside, you see two zones. If you flood-fill from inside, you see one zone. Both results are wrong--there is a path out of the room, but not a path in, so the game should do A* if a creature is trying to leave the room, but not if it's trying to enter.

There was a suggestion a while back to not flood-fill through doors, and instead make a small directed graph of which zones are connected with doors and do A* on that (since it's a very small graph, failing to find a path is not really so bad). It's a good solution to this problem, and can also fix the problem of invaders and wild animals and other non-dwarves refusing to go through forbidden doors.
Logged

Tharwen

  • Bay Watcher
    • View Profile
Re: One way pet accessible door setting, smarter pet owners.
« Reply #8 on: August 26, 2011, 03:58:15 pm »

I think one-way paths break A* or something.
I remember hearing something to that extent, at least.

Other notable flaw in A*:
-Paths that cost the same (IE entrance perfectly bisects a segment of a square, exit perfectly bisects the opposite segment -- going either way around the square has the same pathing cost) create loops in the code (hence you see a bigger impact on FPS if you do something like that).

What is "A*"? I can't google search for the meaning because its only two characters long and one of them is an asterisk.

It's the most commonly used pathfinding algorithm in games (including DF).

Anyway, I don't see why it would break it... all you'd need to do is count one-way doors as impassable from a certain side. The only real issue I can see is that doors in dwarf fortress don't actually have an orientation.
Logged
[Signature]