Follow path behavior

Discussion and feedback on Construct 2

Post » Sun Dec 18, 2011 2:29 pm

Hi,
Has anyone done any work on a "Follow Path" behavior for CC2. In game dev platforms like Kodu there's a robust path editor which you can get objects/sprites to follow. I'm surprised it's not in the main tool download as you'd often want a monster to follow a path for a platformer type game. I saw someone had this built for Construct Classic.
Cheers
Toxic
B
12
S
2
G
5
Posts: 20
Reputation: 4,032

Post » Sun Dec 18, 2011 3:12 pm

Seconded. This would be a great help, specially for certain types of games, and mainly spline paths not straight.
B
58
S
13
G
10
Posts: 632
Reputation: 12,505

Post » Sun Dec 18, 2011 7:17 pm

Thirded (I know, not a word xD). This would also be great for RPGs when you want to move sprites when an event is going on. Assuming you can switch movement type at runtime. Is that possible btw?VampyricalCurse2011-12-18 19:17:59
B
47
S
10
G
6
Posts: 455
Reputation: 8,326

Post » Sun Dec 18, 2011 8:17 pm

Waypoints can suffice pretty suffiecintly for the moment. You could even get very clever with complex interpolation in combination with waypoints. I have no idea if this is even possible within C2 (and I don't really understand the maths) but I'm sure it's possible in some way.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,390

Post » Mon Dec 19, 2011 3:57 am

It is possible in a limited way with way points. It would serve for some cases but not for a lot of others. When we think about paths we're talking about curve paths not simple straight. These are straightfoward to implement (maybe not for everyone). Make a spline path with these way points and then it get's really useful.Kiyoshi2011-12-19 03:59:50
B
58
S
13
G
10
Posts: 632
Reputation: 12,505

Post » Thu Dec 22, 2011 10:52 pm

I've spent some time fiddling around with waypoints.
Works quite well once you get the hang - check out the demo...
http://www.scirra.com/arcade/games/examples/139/waypoints
I'll try to remember my dropbox account and upload the capx
B
12
S
2
G
5
Posts: 20
Reputation: 4,032

Post » Thu Dec 22, 2011 11:04 pm

There we go...
http://dl.dropbox.com/u/15786086/Path%20Following%20with%20Waypoints.capx
Enjoy...
B
12
S
2
G
5
Posts: 20
Reputation: 4,032

Post » Fri Dec 23, 2011 1:03 am

Here is a way to do a spline though waypoints:
http://dl.dropbox.com/u/5426011/examples%208/catmullrom.capx

A plugin could be made to hide the formula, but there isn't a way to make an in IDE node editor at this time.
B
79
S
24
G
52
Posts: 4,724
Reputation: 39,711

Post » Fri Dec 23, 2011 1:09 am

R0J0hound wins!!! :D
B
58
S
13
G
10
Posts: 632
Reputation: 12,505

Post » Fri Dec 23, 2011 1:15 am

@R0J0hound Dam thats some Formula... my head just exploded looking at it.
B
40
S
14
G
11
Posts: 243
Reputation: 9,427

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 5 guests