BEEmod / BEE2.4

Tool to mod Portal 2's Puzzlemaker
282 stars 63 forks source link

Pathfinding #1751

Open Konclan opened 2 years ago

Konclan commented 2 years ago

Description of the feature

A system for pathfinding between two points. It would need:

Why should this be implemented

Ideally antlines, catwalks, vactubes, and any other item/feature that can use pathfinding should use the same system. This would make future items way easier and dramatically improve existing items. If antlines could be completely split to a new system they might even be able to follow blocks and angles.

Additional information

No response

TeamSpen210 commented 2 years ago

There's many pathfinding algorithms developed by people, I just need to grab a library for it. Actually the way they work is based on cost - for each cell position, you tell it what connections are allowed (stairs, corners, etc), and how much each would "cost". Then it tries to find the route with the smallest cost. So for antlines for instance we'd want to add an additional cost to corners to discourage that, but we'd need to tune how much that needs to be.

A prerequisite system though is having a collision system, so we can tell where items are and not run straight through them.

seagull101 commented 1 year ago

This could also be useful for catwalks and gel pipes if we add dynamic test chambers in the future.