Pathfinding across height levels in top down

0 favourites
  • 4 posts
From the Asset Store
Cybernetic Rave
$17.50 USD
50% off
Take your creativity to new heights with over 410+ files.
  • Hi everyone,

    I'm wondering if anyone is aware of a way to fake height differences for a top down game? The catch is that the pathfinding behavior needs to be able to navigate it.

    So far I've been toying around with assigning a height variable to sprites and if my player would hold the same value in an internal variable the sprite would be permissive else it would be set to solid. Worked ok for only the player.

    Now if I applied it to enemies the pathfinding would need to be able to predict what sprites make you transit from one level to anothe, what order is required and all of that.

    Is anyone aware of good concepts for this topic?

  • Unfortunately Construct 2 is only capable of supporting one obstacle map at a time for its pathfinding behavior, so I don't think it'll work in the way you intend it. Barring that maybe you can also do something by adding/removing path cost to certain obstacles, but I'm not sure if that'll make any difference in the long run.

  • Sup with that? Thanks for your reply.

    So I'd set all sprites of the current enemy's height level to low cost and all others to high, right? An idea if that would be applicable per enemy instance, each having their own cost situation? Guessing thats probably all in the obstacle map too and hence not instanciatable either, no?

    Just thinking out loud, all it would take is a gap in walkable cells between two sprites of different height. A staircase sprite could bridge that gap. Is there a way to edit or manipulate the walkalble cells other than through solid objects?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That's the idea, but since it's still all tied to one and the same obstacle map I don't think the path cost thing would help either.

    You can set the Pathfinding obstacles to Custom in its parameters and then add obstacle types through events instead of setting it to Solids.

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