Platformer Pathfinding using Tilemap Pathfinding?

0 favourites
  • 6 posts
From the Asset Store
This is a black tileset with 2 tilemaps, props, one animated character and more.
  • So I've done a bit of searching and realised that designing a platformer Pathfinding behaviour for AI is exponentially tricky and difficult as the complexity of the map increases. For example, 2 horizontal platforms, on of top of the other. The player is standing on the platform above and the enemy directly on the platform beneath him, and the distance between them is such that jumping from the lower platform is not enough to reach the platform above. Instead, the enemy has to walk all the way to the end of the map on the right to jump on a mini 3rd platform to get to the one above.

    https://i.imgur.com/c2MIcxs.jpg

    What I'm curious is whether it's feasible to overlay a top-down tilemap onto this map which only has the walkable paths as the tilemap path.

    So the enemy will spawn a tilemap entity that Pathfinds to the Player. The enemy will then follow this tilemap entity

  • I wouldn't use pathfinding at all unless it's a top down game. For side scrolling platformer you can use line of sight and move X.

  • I wouldn't use pathfinding at all unless it's a top down game. For side scrolling platformer you can use line of sight and move X.

    Thanks for the reply! The thing about line of sight though is that in less direct situations such as the one I have stated, the AI might not be able to navigate to reach the player. Detours have to be made that make making such AI actions more tricky

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • maybe this will help:

  • I'm not sure what the main problem is that you are having, are you saying that you can't work out a way to have the enemy move across the platform, jump up and then left towards the player? Detours will have to be made, the AI won't know which path to take up to that platform but you can code it in with events.

  • Pathfinding using a tilemap might be a good idea if your enemy doesn't have platform behavior. (say, if it's flying above the ground and you move it using Bullet or MoveTo)

    With platform behavior you'll have to find the path first, and then move the enemy from one node to another, simulating platform controls - either left, right or jump. You'll also need to make sure that your enemy can jump across gaps, obstacles etc.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)