suggestion: path following

New releases and general discussions.

Post » Tue Aug 05, 2008 2:07 am

suggestion: path following

Alright, I need to have a bunch of marble sprites follow a path in a tube (or half-pipe) picture. This could be a built-in feature of Construct, a behavior. I could set a start point, an end point, and a path (an invisible line) for the behavior. Everything with "follow path" checked in their properties would connect to the path on contact with it... or could be coded to connect only to objects already on the path.

Obviously, this would allow one to make a game similar to Zuma or Sparkle, and I believe I would actually like to make a game like those. I'm not sure if I could do it without some sort of behavior built into Construct, but I've done similar things in ActionScript 1.0, so I'm positive it can be done.
B
2
G
4
Posts: 71
Reputation: 1,192

Post » Tue Aug 05, 2008 3:07 am

I support a path movement, but not quite like you suggested, because that sounds a little too specific to that game-type.

I don't think Construct should make your games for you, hehe.

A path movement with nodes or following a vector however, I fully endorse (as if it matters, Ashley is king ;))
B
2
S
2
G
5
Posts: 391
Reputation: 2,432

Post » Tue Aug 05, 2008 10:41 am

This has been mentioned before and is on the todo list, but here is my idea (Quoted from "Object and behaviour requests" page 2)

[quote:ljn03k55]I would like to see a path object & behaviour where you place a path object and give it a path name and decide where the waypoints are then any object with the path behaviour can be told to follow the path.

eg: I place two path objects and give them each 10 way points, one is "Left" the other is "Right". Then I create a sprite with the path behaviour and I can tell it to follow Left, reverse at the end of Left, and then follow Right.

This would allow more than one path for each object which makes designing custom AI easier
[/quote:ljn03k55]
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Tue Aug 05, 2008 12:25 pm

[quote="Jayjay":aq61xzdb]This has been mentioned before and is on the todo list, but here is my idea (Quoted from "Object and behaviour requests" page 2)

[quote:aq61xzdb]I would like to see a path object & behaviour where you place a path object and give it a path name and decide where the waypoints are then any object with the path behaviour can be told to follow the path.

eg: I place two path objects and give them each 10 way points, one is "Left" the other is "Right". Then I create a sprite with the path behaviour and I can tell it to follow Left, reverse at the end of Left, and then follow Right.

This would allow more than one path for each object which makes designing custom AI easier
[/quote:aq61xzdb][/quote:aq61xzdb]
I'm liking the sound of that one, it would certainly make programming AI and pathfinding a lot easier.
B
2
S
2
G
5
Posts: 156
Reputation: 1,962

Post » Tue Aug 05, 2008 3:10 pm

would be cool if you could make the paths curved,
so like you have 2 points that it would usually move to in a straight line, then you could drag a box in the middle of the line one way or the other and it would bend the path so you could make nice curved paths rather than an approximated path using multiple straight lines.
B
2
S
2
G
5
Posts: 236
Reputation: 2,122

Post » Wed Aug 06, 2008 11:53 pm

hm i know it uses quite a bit cpu but you could use the rts movement's pathfinding. Maybe...
B
13
S
3
G
5
Posts: 286
Reputation: 3,193

Post » Thu Aug 07, 2008 1:32 pm

The RTS movement only burns CPU if you make a mistake in your events and ask it to recalculate the path every tick (done in the 'Move to...' actions). If you limit it to once per second at the most regular, you shouldn't have any CPU usage problems.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Thu Aug 07, 2008 4:29 pm

The RTS movement pathfinding would work in lots of cases, but if it was to be used for paths in a sidescroller or game where there is supposed to be some decent AI (taking paths that avoid stronger enemies or other comparing), it don't think it would work, or work efficiently.
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Thu Aug 07, 2008 8:39 pm

this would be a pretty cool addition I can already think of what could be made with it.
B
2
S
1
G
4
Posts: 239
Reputation: 1,778


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 1 guest