Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Pet Pathing Question  (Read 608 times)

GenericOverusedName

  • Bay Watcher
    • View Profile
Pet Pathing Question
« on: November 09, 2009, 02:17:01 pm »

Now I know that pets will attempt to path through closed, pet-inaccessible doors. However, would they do the same for hatches? I was thinking of creating zoo-like pits for storing creatures in, with stairs covered by a hatch cover for the entrance/exits. Would this work, or would I have to deal with the processor-draining animal pathing that I would have with ordinary doors?
Logged

Squirrelloid

  • Bay Watcher
    • View Profile
Re: Pet Pathing Question
« Reply #1 on: November 09, 2009, 02:52:46 pm »

Now I know that pets will attempt to path through closed, pet-inaccessible doors. However, would they do the same for hatches? I was thinking of creating zoo-like pits for storing creatures in, with stairs covered by a hatch cover for the entrance/exits. Would this work, or would I have to deal with the processor-draining animal pathing that I would have with ordinary doors?

Pets do not path through tightly closed (re:locked) doors.  But they do through Open, Pet-inaccessible doors.

I imagine the same applies to hatches.
Logged

Derakon

  • Bay Watcher
    • View Profile
Re: Pet Pathing Question
« Reply #2 on: November 09, 2009, 03:10:10 pm »

Anything dwarves can path through, pets will assume they can path through. This is part of the "use the same pathing components system for all units regardless of affiliation" that means, for example, that enemy units can't make it through your forbidden doors. The pets won't realize their mistake until they reach the object they can't path through, at which point they say "Well, dang, can't make it through. Is there some other way to get where I want to go! Ah hah! I just have to walk through this door! Well, dang, can't make it through..."

Squirrelloid: pets do path through tightly-closed doors, which are completely different from locked doors. But they can't walk through either. Pathing is the act of determining how a unit will get from point A to point B, and it's computationally expensive.
Logged
Jetblade - an open-source Metroid/Castlevania game with procedurally-generated levels

GenericOverusedName

  • Bay Watcher
    • View Profile
Re: Pet Pathing Question
« Reply #3 on: November 09, 2009, 03:53:09 pm »

Hmm, darn. Guess I'll have to figure out some other way of doing it, then. Maybe bridges?
Logged

Derakon

  • Bay Watcher
    • View Profile
Re: Pet Pathing Question
« Reply #4 on: November 09, 2009, 04:38:03 pm »

To cut the costs of animal pathfinding without caging them (which stops further breeding), you need to put them on a separate pathfinding component from the rest of the map, so there's literally no path (for neither pet nor dwarf) from where they are to wherever they want to be. A pit with a bridge access should work.
Logged
Jetblade - an open-source Metroid/Castlevania game with procedurally-generated levels

Squirrelloid

  • Bay Watcher
    • View Profile
Re: Pet Pathing Question
« Reply #5 on: November 09, 2009, 04:53:25 pm »

Anything dwarves can path through, pets will assume they can path through. This is part of the "use the same pathing components system for all units regardless of affiliation" that means, for example, that enemy units can't make it through your forbidden doors. The pets won't realize their mistake until they reach the object they can't path through, at which point they say "Well, dang, can't make it through. Is there some other way to get where I want to go! Ah hah! I just have to walk through this door! Well, dang, can't make it through..."

Squirrelloid: pets do path through tightly-closed doors, which are completely different from locked doors. But they can't walk through either. Pathing is the act of determining how a unit will get from point A to point B, and it's computationally expensive.

I think that's what I meant.  Sorry, game not open to check accurate terminology.  (for some reason thought tightly closed == locked).

I actually was one of the first to do the experiment that demonstrated this fact, i believe.  Its on the wiki because of me at least.
Logged

Dorf3000

  • Bay Watcher
    • View Profile
Re: Pet Pathing Question
« Reply #6 on: November 10, 2009, 03:51:22 am »

To cut the costs of animal pathfinding without caging them (which stops further breeding), you need to put them on a separate pathfinding component from the rest of the map, so there's literally no path (for neither pet nor dwarf) from where they are to wherever they want to be. A pit with a bridge access should work.

There was another post here complaining that animals would escape as soon as there was access outside (for the butcher).

How about a pit with an open rim around it, filled with animals, say 5x5.  There would be no access to the pit floor at all so no pet pathing problem.  And to get the animals out, the pit floor is covered by a retracting bridge.   There was a post here some time ago doing experiments with bridges that proved retracting bridges can also throw creatures up a z-level, just not as often as the raising bridge, and of course it won't atom smash anything.

You wouldn't be able to control exactly which animals will get thrown out, but there would be no pathing or escaping problem.  Also I'm not sure if setting an inaccessible animal to be slaughtered causes any job cancellation messages.  If not, all the animals in the pit could be set to be butchered and only the 'lucky' escapees would be collected.
Logged
I had a tigerman get elected mayor and he promptly mandated 3 bowls of cereal.

thepuska

  • Bay Watcher
    • View Profile
Re: Pet Pathing Question
« Reply #7 on: November 10, 2009, 04:01:42 am »

They path less when they're unconscious or stunned. Rig a device to automatically do this.
Logged