Car Traffic AI.

0 favourites
  • 8 posts
From the Asset Store
100 high-quality cars / boats. This asset is perfect for a top-down game.
  • Hi........I am making a car race game so in my game there will be a traffic in which cars and other vehicles will be there and they act as AI in the game. All the vehicles has to follow the path and if one stops rest in the back has to stop and after stopping if one vehicle takes reverse the rest in the back also has to take reverse with equal distance between them. I tried behaviors like Path finding and Line of sight to achieve this and also the functions but couldn't achieve it. Can anyone PLEASE HELP me with this PLEASE?

  • There should be some kind of RTS example in Construct itself, a top downer with tanks.

    There are things like this (not overlapping) inside already, that should be a start!

  • Yea but I am using free version of construct 2. the event sheet is limited I couldn't access the event sheet of that example.

  • Can You please help me with some other thing please?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Honestly I´d recommend to buy the full version soon if you want to go on with this, cause you will hit the 100 event limit very very fast.

    I´m not one of the cracks here regarding to programmin, but I´m pretty sure that even what you want (realistic traffic) + player movement will hit the limit.If not, then feel free to correct me anybody

  • Is there any other way ?

  • I might suggest some kind of sensor sprite out in front of each car to help you pick out the car in front. Once you have the location of the nearest car in front, you can check the distance, and speed up if it gets too far away, slow down or reverse if it gets too close. You can compare the angle to the car in front to see if you need to turn left or right. You can get a number of interesting swarm behaviors with variations on this algorithm.

    Edit: http://en.wikipedia.org/wiki/Boids. I think there may be an implementation somewhere around here....

  • That's quite interesting but can You please give me a clear cut by an example. Please.?

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