How to keep cars on a track?

This forum is currently in read-only mode.
From the Asset Store
Simple and easily editable template for a dynamic camera that zooms in and out based on how far apart the players are.
  • 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.

  • 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

  • Thanks a lot

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)