"Manual" Ticks & Pathfinding

0 favourites
  • 7 posts
From the Asset Store
Units do not overlap each other and use different ways if there are several free ways.
  • So probably a real dumb question, but how would i simulate manual ticks when it comes to pathfinding?

    I've figured out how to do it for the player, simply tying all applicable actions in the scene to the player's movement commands (Keyboard > On X Pressed), and having a Set Position of +/- X pixels tied to the player location, etc. Then all "ticks" only occur when the player moves his sprite.

    But from what I can tell AI pathfinding's "Move along path" seems to assume the ticks aren't manual, and I'm not sure how to make them function the same way.

    Ideally I'd have a "Move along path X pixels then stop" option, but I'm new and don't know how to simulate that.

    To make things more complicated, the world's laid out in tiles, where movements are from tile-to-tile, not fluid and natural.

    Anyway, not looking for anyone to do it for me, just looking for tips and ideas.

  • Here thread suggestion from my post:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That appears to be too advanced for me, plus it seems to more revolve around manual path creation for player sprites to then follow, rather than automatic path creation for AI to follow, I just want them to follow it one "step" at a time per "manual tick".

  • There is an example using Construct Classic. It appear using hexagonal path

    Another CC sample but more simple and close to what you wanted

  • The first I can't open in Construct 2, and the second appears to've been removed from Dropbox.

    I've tried a few more things, but I can't quite figure it out. The engine really doesn't seem to be designed to allow for non-fluid actions.

  • Basically pathfinding rely on flood-fill technique. So tracing a goal position is done by checked neighbour tiles then fill them one by one. Creating stepped move shouldn't be hard, you just need to understand the system.

    That may refer to "quick grid movement":

  • That looks more like what I'm looking for with player control, I'll see if I can relate it to AI pathfinding.

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