How to keep cars on a track?

For questions about using Classic.

Post » Fri May 28, 2010 2:38 pm

Hi, just learning how to use Scirra and wanted to create a simple, top-down racing game. 4 cars on a track. The thing is, I have no idea how to keep the none player cars on the track. I've though about the path tool but that would make them to rigid in their movement (I think, unless I've missed something). Is there a way to get cars to follow a track but be free(ish) in how they move. I know I'm looking at AI here but I was hoping there's something in Scirra to cover it.

Thanks for any help.

JB.
B
2
G
2
Posts: 13
Reputation: 676

Post » Sat May 29, 2010 10:18 am

This might help you out.

http://dl.dropbox.com/u/1646976/GP2.cap

Layout 2 is the one with the basic AI driver, it also uses custom movement instead of the Car behaviour.

I haven't tried out the Path Plugin properly but I'd guess it's a lot easier/better than this example, which was made before the Path Plugin was released.

BTW - cap was made in 0.99.82
B
46
S
23
G
7
Posts: 459
Reputation: 6,763

Post » Sat May 29, 2010 2:49 pm

Thanks a lot :)
B
2
G
2
Posts: 13
Reputation: 676

Post » Sat May 29, 2010 5:26 pm

Yeah the Path plug might actually work pretty nice for this. I wouldn't use any predefined paths tho, just add node at x,y +random x,y.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Sun May 30, 2010 5:02 am

I haven't used the path movement, but it should work fine, and so should custom movement. I would add, though, that if the AI is controlled that way, the player car should be as well. If not, it may be difficult to make the player cars and AI controlled cars behave like they're obeying the same exact rules of motion.
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests