Pathfinding for traps. Pathfinding in general

Started by antstar, May 22, 2018, 05:12:30 PM

Previous topic - Next topic

antstar

So, this just happened: (see pic)
The pathfinding for avoiding traps in the game is really not sufficient. There should be a way to Forbid walking on traps, but even if I selected the traps area then inverted it and make this the allowed area, I still get this - a group shows up uninvited, gets themselves killed walking where they shouldn't and then blames me for them being idiots :-/

I would also like to propose additional pathfinding be implemented. I am playing a snowy level and I have snow cleared and paved a section for colonists to use in a "L" shape. even though this is quicker, they still walk diagonally across the snow. I understand that human fuzzy logic is more efficient than computers for some things, but I think it would be computationally trivial to see that this way is much more efficient and use it. I am not so worried about a few extra % but sometimes they walk parallel to the path, on the snow.

Finally, whilst I know there are tools to restrict people to various areas, Once a path has been generated from A to B it shouldn't be too hard to calculate the travel time for that route. It would be great if people wouldn't embark on a voyage across the map that will kill them by hypothermia twice over. In game it makes no sense, out of game, this should not be super hard to implement :D

[attachment deleted due to age]

Demonlord091

Agreed. The game needs better pathfinding. Also more memory/ new engine/ and upgrade to x64.

I've loved Rimworld for years. I really hope it does well when it reaches full release. Would be a shame if it was abandoned as soon as it came out.

tmo97

#2
Totally. I never use traps unless I have the mod that disables colonists triggering it.
People don't use this game feature because of how they work. That's just bad.

I bet you get tons of crap from people saying that you're too lazy to build intricate designs to circumvent the awkwardness of trap workings, even though you just displayed that taking it as a game feature is not only a big space/wealth/time sink, but doesn't even work.

Don't get me wrong on this one Tynan but you've been struggling with pathfinding since the start of this game, it might be time to ask for advice.

Every single large issue in the game is caused by bad logic as to what pawns should do in a given situation. True, right? :D

Pawns dropping the commands you forced on them because they suddenly want the meal that you just forced them away from. Pawns walking in zig zag patterns instead of a straight diagonal line. Pawns not caring about the fact they can see 20 traps in that 1-wide corridor and yet they choose to walk through it. Pawns preferring to walk on dirt rather than picking the path you made for them, pawns preferring to take the long ass 1-wide corridor through a mountain rather than walking around it. Etc.

p.s. had to add the fact that they dont even care about walking through fire to get their meal in the middle of a gunfight.

p.p.s. i frikin love this game.

Aerial

I agree pathfinding needs some work.  It's also a lot harder and more computationally intensive than many realize simply because pathfinding is something the human brain does really well.  Getting a computer even close to the same level is a challenge.

Anyway, one thing you can do to keep pawns from triggering traps is to lay them out in a checkerboard rather than on every space.  They walk zig-zag on the clear spaces and don't trigger the traps but enemies aren't programmed to do that and walk straight lines through the traps.  Like so:

w = wall
t = trap

wwwwww
t  t  t  t
  t  t  t  t
wwwwww

Since I started doing this I've had 1 pawn (including visiting traders and their muffalo) trigger a trap in about 400 hours of gameplay.  So I think there must be some very small chance of a critical failure that would still allow it but it's rare enough that I don't even think about it any more.

tmo97

#4
Awesome thanks for finding me a working pattern.
Ironically I never tried that one because I always felt like the attackers would have enough pathfinding smarts to do the same as my pawns, and if pawns choose to take the only path into the fort that has traps and then subsequently walk on those traps, I wouldn't figure that they would be smart enough to differentiate, and therefore the enemies would neither, so I've just been avoiding traps altogether.

Thanks though :)))))))))))))  ;D

I was thinking about what I forgot to say here, now I figured.

Let's introduce the issue where your pawn walks all the way across the map, only to half-way decide they want to relax socially at a table, walk all the way back to the table, sit for a second, so they can walk all the way across the map again, so they can get there, half-ass a sapling, then go to bed because they wasted all day walking and doing nothing.
fyi i find all these rimworld logic issues absolutely hilarious

antstar

Quote from: Aerial on May 29, 2018, 09:24:41 AM
I agree pathfinding needs some work.  It's also a lot harder and more computationally intensive than many realize simply because pathfinding is something the human brain does really well.  Getting a computer even close to the same level is a challenge.

Anyway, one thing you can do to keep pawns from triggering traps is to lay them out in a checkerboard rather than on every space.  They walk zig-zag on the clear spaces and don't trigger the traps but enemies aren't programmed to do that and walk straight lines through the traps.  Like so:

w = wall
t = trap

wwwwww
t  t  t  t
  t  t  t  t
wwwwww

Since I started doing this I've had 1 pawn (including visiting traders and their muffalo) trigger a trap in about 400 hours of gameplay.  So I think there must be some very small chance of a critical failure that would still allow it but it's rare enough that I don't even think about it any more.

Yeah I have used this with success, though usually they only hit half your traps, so its just doubling the price of your traps. This was on a map where resources were scarce enough that I couldn't really double up when I started it.