Jump to content

Broken Pathfinding


Cliffford W.
  • Closed

For some reason larvaes, pigs and other entities go around walls yes but when there is a gap in the wall and there is any structure with blocker tag the AI seems to chose go through the gap with the blocker insetad of going around the wall which makes the AI look dumb and broken.

I've tried fixing it by adding statues from Potter's wheel to pathfinding

The result:

https://streamable.com/5jcklz

(NOTE: the reason why larvae broke the wall at the end is cause i've edited the code cuz it does not work properly as if you ran vanilla)


Steps to Reproduce

1. Build a long wall along dragonfly desert and make a gap in it

2. Fill the gap with any blocker like statue, sign or meat bulb or whatever

3. See how the AI attempts to go through the gap with the blocker

  • Like 1
  • Spool 1



User Feedback


It's not a feature the AI ain't supposed to get stuck at obstacle that is in the way it's supposed to find way around or even destroy whats in the way.

  • Potato Cup 1

Share this comment


Link to comment
Share on other sites

I would not say pathfinding is broken. I'm sure you know pathfinding is a hard problem, where you want to balance efficient computation (memory+time) with effective pathfinding (how well obstacles are evaded). Perfect pathfinding is possible, but too computationally expensive. Lava pools and burnt structures are also seen as "gaps"  by entities pathfinding. The more checks you add, the better the pathfinding, but the more expensive it becomes. I wonder if the current pathfinding is implemented this way to avoid server lagging.

I have also sometimes wondered how you could fix some pathfinding issues (e.g. I think blocking the Fuelweaver with lureplants/spider eggs is extremely cheesy, and a couple simple of checks on the fuelweaver could fix this), but ultimately it is up to the devs to tune the pathfinding parameters.

@Cliffford W. do you have a mod that implements this behaviour? I would love to test it! I also have a couple of ideas for pathfinding for bosses, but I don't know how hard it would be to implement them. 

 

  • Thanks 1

Share this comment


Link to comment
Share on other sites

7 hours ago, EirikGerhard said:

I would not say pathfinding is broken. I'm sure you know pathfinding is a hard problem, where you want to balance efficient computation (memory+time) with effective pathfinding (how well obstacles are evaded). Perfect pathfinding is possible, but too computationally expensive. Lava pools and burnt structures are also seen as "gaps"  by entities pathfinding. The more checks you add, the better the pathfinding, but the more expensive it becomes. I wonder if the current pathfinding is implemented this way to avoid server lagging.

I have also sometimes wondered how you could fix some pathfinding issues (e.g. I think blocking the Fuelweaver with lureplants/spider eggs is extremely cheesy, and a couple simple of checks on the fuelweaver could fix this), but ultimately it is up to the devs to tune the pathfinding parameters.

@Cliffford W. do you have a mod that implements this behaviour? I would love to test it! I also have a couple of ideas for pathfinding for bosses, but I don't know how hard it would be to implement them. 

 

https://streamable.com/3kvws2

Share this comment


Link to comment
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...