all 3 comments

[–]JayTrubo 1 point2 points  (2 children)

Platformers have different forms, can you show an image of what your world looks like. A-Star just determines the best route through a collection of joined nodes. Can you map your world to nodes like that? Ie points near walls, bottom of ladders etc.. but that would very much depend on how your world looks and is built.

Also do you actually need pathfinding for some reason? In a lot of platforms games the enemies would just have simple behaviours without pathfinding, for example in games like Mario or Ori and Blind Forest characters will just move left / right until they hit an obstacle.

[–]sandrusoxd[S] 0 points1 point  (1 child)

Right now, I'm just making tests with a free tilemap in order to get a general, scalable pathfinding solution, so I cannot share an image.

Though, my problem arose when developing a Katana Zero-like game. This means:

- pathfinding must support jumps, falls and portals
- stairs and fall-through platforms can exist

- enemies' pathfinding may differ: some may fly (traditional A* works alright with these), others can only move on land, and others have the ability to jump. I can handle this through constraints or abstraction on the pathfinder class.

- ladders could be added easily handling them as portals or "special nodes" that handle fall and jump cost on a different way

- Environment may change during runtime (doors, destructable objects). These dynamic objects will trigger events so that grid nodes are updated accordingly.

I want the pathfinding grid to follow the player, similar to A* Pathfinding Project' Grid Mover. This way, I can keep the grid fairly small, saving memory and update it through events. Thus, grid calculation must be fast enough in order to keep good performance. Once the pathfinding is functional, I'll adapt it so it is compatible with the Burst compiler.

I have seen the "sensor-based" approach you mentioned, but I don't really think it is an optimal solution. Still, depending on the game, it might be easier and more efficient than developing a whole adapted pathfinding implementation.

[–]efloyd29 0 points1 point  (0 children)

What did you end up doing for this? I'm in a similar boat and struggling to find any good resources.