PathFinder SLOW

Discussion and feedback on Construct 2

Post » Wed Mar 14, 2012 1:30 am

Friends, I am using the Pathfinder behavior, but it is getting very slow, crashing the game. Does anyone know if I did something wrong?
If I put more monster hardly move.


http://dl.dropbox.com/u/66975768/DRMotoSerra.capx
B
37
S
8
G
4
Posts: 85
Reputation: 5,099

Post » Wed Mar 14, 2012 5:32 am

Might want to read over the behaviors documentation a bit. In particular the part about the map being square. Also its not meant to be ran all the time. Its more suited to a turn based setting.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Wed Mar 14, 2012 10:03 am

I found that if you need continuous pathfinding (to a moving target, for example) it is better to create your own fake pathfinding method.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Wed Mar 14, 2012 10:11 am

you did the mistake I did before, that you recalculating the path every x seconds... I have adjusted mine to only recalculate, when something hits a new obstacle... this increases the performance a lot:

Demo:
http://www.ubivis.de/td
B
42
S
9
G
6
Posts: 437
Reputation: 5,626

Post » Wed Mar 14, 2012 1:44 pm

Thank you, I will implement your ideas.
B
37
S
8
G
4
Posts: 85
Reputation: 5,099

Post » Wed Mar 14, 2012 1:48 pm

if you like to have a look into my project, here is the current status:
http://www.gogwiki.com/temp/TD.capx
B
42
S
9
G
6
Posts: 437
Reputation: 5,626

Post » Wed Mar 14, 2012 3:28 pm

THANKS... ^_^X
B
37
S
8
G
4
Posts: 85
Reputation: 5,099

Post » Wed Mar 14, 2012 3:41 pm

I did not find link to download the Timer behavior, only for the plugin. Do you know where I can?
B
37
S
8
G
4
Posts: 85
Reputation: 5,099

Post » Wed Mar 14, 2012 3:48 pm

oh sorry, the timer has no functionality yet :)

The Plugin is located here:
http://www.scirra.com/forum/behavior-timer_topic46403.html
B
42
S
9
G
6
Posts: 437
Reputation: 5,626

Post » Thu Mar 15, 2012 12:11 am

I tried to put the re-calculation of the pathfinder in the collision, but not much has changed.
B
37
S
8
G
4
Posts: 85
Reputation: 5,099

Next

Return to Construct 2 General

Who is online

Users browsing this forum: Eisenhans, Televangelist and 4 guests