Pathfinding suggestion for platformers

0 favourites
  • 3 posts
From the Asset Store
Units do not overlap each other and use different ways if there are several free ways.
  • Hey!

    So I was wondering about a new action in the pathfinding behaviour that I reckon would be of use to those making platformer games.

    I've implemented the behaviour into my game and it's going pretty well so far, but I realised that the pathfinding behaviour expects the sprite to go EXACTLY into the coordinates of the cell in order to begin travelling to the next cell. This is a bad thing with platforming, as is could be pretty unlikely that the sprite will go exactly into the cell's coordinates.

    I was thinking an action "Go to next cell" would be great. This could be used with the event "Pick overlapping point", to test if the sprite is overlapping the cell's coordinates, which will then allow the sprite to begin travelling to the next cell, rather than incessantly trying to precisely hit the cell's coordinates!

    Is there any shortcomings to this idea?

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Jase00 well just doing the the overlapping point test would do the trick here i think, from the moment its overlapping you call the next coordinate, a distance check could work as well

  • vtrix , hey, you're right, never thought of that! I can add an extra instance variable and increase it when each one is reached. Thanks!

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