[Behavior]PathFinder

Post your completed addons to share with the community

Post » Wed Jul 18, 2012 12:56 am

[QUOTE=Kyatric] @Guif0DA: [QUOTE=TL22] You probably want something more like A* and pathfinding. 00Rez came up with a really sweet couple of plugins that can work in conjunction with one another to do what you're hoping. You can find them here in the Rez Repo topic. You can even find an example of using Rex's moveto in conjunction with the pathfinding behavior and A* plugin. Pretty cool stuff.[/QUOTE]
Quoted from the moveto behavior's topic.

I haven't tried it myself, but if there's already a provided example, it sounds like 00Rez's solution might be more suited to your needs.

I guess with my plugin, the iteration solution stands, iterating through the path's array, sending the next step's coordinates to the moveto behavior, and rely on a "on destination" trigger to iterate the next step.[/QUOTE]
Thanks for reply!
I would like to use your pathfinding than the one from REZ, your seems more complex, with more actions and expressions.
The example that uses moveto uses the pathfinding from REZ..
But I will try again to make it work and see if this time the game doesn't crash.
B
30
S
6
G
5
Posts: 433
Reputation: 6,061

Post » Sun Aug 19, 2012 11:53 pm

@Kyatric, now I know what I will be doing for the rest of the day. As usual, thanks for another instructive tutorial with great .capx.
B
28
S
4
G
3
Posts: 70
Reputation: 4,879

Post » Mon Aug 20, 2012 2:34 am

@jwjb: Thanks for the kind words and have a good day

Note for people who read this topic: You might also want to check rez's pathfinder his works in real time, this one I'd rather recommend for turn-based type of games.
Anyhow, be aware there are two behaviors existing that proposes close features.Kyatric2012-08-20 02:36:01
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Tue Aug 21, 2012 5:10 am

This behavior is perfect, it should be a part of the standard construct library. Thank you so much!
B
15
S
3
Posts: 6
Reputation: 1,448

Post » Tue Aug 21, 2012 8:32 am

Could one use this on a moving target, such as a ball? So that a sprite can always try to reach its target even if it is moving and its obstacles are dynamically spawning / destroying within the layout?
B
39
S
12
G
8
Posts: 580
Reputation: 7,108

Post » Tue Aug 21, 2012 10:16 am

@CrudeMik: I guess one could and manage so that the process is not too intensive or the layout too big to have it working without slowdowns.
As mentioned three posts above:
"You might also want to check rez's pathfinder his works in real time, this one I'd rather recommend for turn-based type of games."
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Sat Oct 20, 2012 10:16 pm

Is there any way of implementing a "cost" for each node? That way it would try to choose the path with less movement cost?

Thank you!
B
26
S
7
G
3
Posts: 118
Reputation: 4,264

Post » Sun Oct 21, 2012 3:22 pm

@juantar: in theory it is possible.
When I made the plugin, I based it out of some JS implementations I had found at the time.
Some of the implementation managed weight.

Here are the links :
http://46dogs.blogspot.fr/2009/10/star-pathroute-finding-javascript-code.html
http://niseg.moshela.com/test_maze.html

(there are even more links in the comments of the first one)

Unfortunately I don't have the time/will to add to the current plugin.
Also, doesn't Rez's implementation contain some weight calculation already ?

Anyway, if you feel like modifying the plugin to add the weight calculation, by all means go ahead.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Sun Oct 21, 2012 7:44 pm

@kyatric,

happy b'day sir...
B
52
S
17
G
15
Posts: 1,029
Reputation: 26,339

Post » Sun Oct 21, 2012 8:53 pm

@Harrio: Thanks :)
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests