Linear movement with pathfinding

0 favourites
  • 4 posts
From the Asset Store
Units do not overlap each other and use different ways if there are several free ways.
  • Hi, constructers. I`m experimenting with pathfinding and trying to make some oldschool rpg-style (grid) movement. I have no problems with grid movement, no problems with pathfinding, but no success with combining first and second.

    Anyone have any idea how to make character to find path and move along it by grids, not smooth and directly?

  • [2] :\\\\\\

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi

    I'm having the same kind of problem while combinating grid movement with pathfinding..

    I didnt test it yet but maybe one idea could be:

    once the path is found you store inside an array all the nodes positions (using NodeCount, NodeAtX etc.. to find them) and then you round these positions according to your grid size (es. 32x32 grid each position is changed to: (floor(x/32)*32)+16 etc..

    in this way you obtain a list of nodes positions aligned with the grid and you can have the player move along them.

    very frustrating though..

  • Something that I have found and enjoy is the plugin found here:

    scirra.com/forum/plugin-fast-path-finding-preview_topic50820.html

    Its "fast pathfinder." the difference is that the regular one finds a path that's wide enough by calculating a pixel by pixel path.

    Fast pathfinder calculates blocking on a grid that you designate the size of. I really like how it works. Check it out.

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