Referencing Pathfinding nodes one at a time. Pathfinding is unreliable for movement.

0 favourites
  • 8 posts
From the Asset Store
Node Downloader is a plugin for download file for Construct 3 and construct 2 game engine
  • I can never get the Pathfinding movement speeds right. Doesn't matter if it's set to 200 or 12 the sprites always seem to move in the same speeds.

    The solution I came up with instead is Bullet or MoveTo for most movement needs however pathfinding comes into play when say a critter is spots my character and moves out of origin point and when I'm no longer in a critter's line of sight I want them to return to origin. In the many tests I've ran it doesn't matter how much or how little I set the max speed. It always moves at the same rate.

    When it comes to the return to origin scenario I described I noticed the

    "on Pathfinding arrived" condition is never met in some cases thus a critter is stuck in limbo until I retrigger it by moving into its line of sight.

    That said I still think pathfinding is valuable for the nodes and I'm thinking of using pathfinding to recalculate path, setting the nodes, then using MoveTo or Bullet to move from one node to the next.

    Any ideas how I can do this? How do I count the nodes to begin with and how do I go about moving through them without using the Pathfinding move along path action?

  • You should not use pathfinding in a hurry. This behavior takes time to perform the search process and is very CPU consuming. What you can do is change the properties to reduce the calculation process, but this will impact the accuracy and vice versa.

  • You should not use pathfinding in a hurry. This behavior takes time to perform the search process and is very CPU consuming. What you can do is change the properties to reduce the calculation process, but this will impact the accuracy and vice versa.

    I have a few ideas. One of which is critter spawns a trail of breadcrumbs while chasing player (using Bullet or MoveTo behavior) it can then retrace these breadcrumbs on return back to origin.

    This is all hypothetical for now but my problem is if it's 2 or more critters chasing sprite at the same time how can I be sure each breadcrumb is assigned specifically to a critter when it's 2 different critters of the same type?

  • You don't need to use pathfinding, if there are no obstacles between the objects.

    You can use the instance variable "src" to store the IID of the object that created it

  • That said I still think pathfinding is valuable for the nodes and I'm thinking of using pathfinding to recalculate path, setting the nodes, then using MoveTo or Bullet to move from one node to the next.

    MoveTo behavior has "Move along pathfinding path" action, super easy to use.

  • This is something I have in one of my old projects. It's a capx I found for Galaga like following and formation. It should be a very good start for you. These picks start with the events, then the enemies and what you need to add to them and then the nodes and what you need to add to those so Hope this helps! MPPlantOfficial

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > That said I still think pathfinding is valuable for the nodes and I'm thinking of using pathfinding to recalculate path, setting the nodes, then using MoveTo or Bullet to move from one node to the next.

    MoveTo behavior has "Move along pathfinding path" action, super easy to use.

    Yoooo I didn't know about this! Will check it out for sure

    This is something I have in one of my old projects. It's a capx I found for Galaga like following and formation. It should be a very good start for you. These picks start with the events, then the enemies and what you need to add to them and then the nodes and what you need to add to those so Hope this helps! MPPlantOfficial

    Nice! will study this as well!

    Thanks for the help as always, guys!

  • > That said I still think pathfinding is valuable for the nodes and I'm thinking of using pathfinding to recalculate path, setting the nodes, then using MoveTo or Bullet to move from one node to the next.

    MoveTo behavior has "Move along pathfinding path" action, super easy to use.

    Just a quick update: I used the "Move along pathfinding path" action and initially critters were occasionally getting stuck in walls as the MoveTo does not have its own built-in system to combat solids. I then tried out the 8-direction behavior turning off the default controls and it's working as intended!

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