Race AI

0 favourites
  • 5 posts
From the Asset Store
Units do not overlap each other and use different ways if there are several free ways.
  • I've made a Micro Machines clone and have a basic AI using Pathfinding which works for 1 race but not the other. I wondered if anyone had any other way of making a race AI as its something I haven't seen much on the forum. I find that pathfinding is too accurate with the line the computer takes and wanted to be able to add hazards on the corner that the computer could hit ie. oil.

    My game is currently hosted at


    The Dining Table level is the one that "works" but as you can see the computer gets "lost" occasionally.

    This is my first attempt at anything using Construct so any help/advice would be appreciated.

  • I'd have thought pathfinding would be a bit CPU intensive, especially when you have a few CPU racers...

    I'd be thinking down the lines of an invisible sprite ahead of the racer that makes "decisions" based on what the car is approaching, and have a room for error built into the variables...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the advice Pixel.

    I have amended the game to use a path of points to turn towards instead of pathfinding which will hopefully free up CPU, I'm now going to look at putting 2 points on the front corners of the car to detect any objects before the car hits it to make it steer away from the object.


  • I have tested the idea of the points on the front corners to reasonable success :) The car definitely "drives" itself around the track.

    Here is the capx of my test AI. Hopefully I can work more on this to make it actually go straight on the straights and "see" the track more.


  • nice job, I'll have a look at that...

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