Can someone create some good AI for my game?

I just need some cars to drive a specific path, I just can’t really think of a way to do it.


Use the AI car (the one that has all the random yellow on it) to code in.

I cant seem to find the discussion for it, but someone was able to do it by using several raycast to rotate the object.

I thought of using raycast, but … could I add you and you mess around with it whenever?

Just do it the way you did it with the arrow

You can but I may not look at it right away, that Minimalistic Competition whore me out a bit.

It basically rotates if the raycast doesn’t see a wall in one of several directions.

Simplest Car AI I have seen was where you place invisible markers around the track as ‘guide targets’.
The AI car then tries to reach target 1, target 2 and so on. You implement a delayed target system like you did for the missile and some avoidance behaviors … that what you are looking for?

P.S. I should have checked your game before I posted this ROFL, just easy the movement from point to point to make it look more natural. Then you can also space the targets further apart. Does it have acceleration/deceleration behavior in there yet? Sorry, can’t see the details on phone.

yeah thatss what he did with the arrow i told him to use the same thing

What I mean is you do not use a direct ‘Point at’. You evaluate the angle you would have to turn. If within a given range (let’s say +/-5 degree) you use Point at. If it is outside that range you adjust the direction only partial (steer left/right). Same as done with the delayed missile thing, sorta. Gives it a much more realistic movement. Add to that some avoidance to other cars and obstacles and it will get really funny :slight_smile:

Oh, and regarding the angle maybe also speed up or speed down … uhhh, sounds cool. Wanna go home now and try, LOL

Yeah, as I said, couldn’t open the editor on my phone and saw it too late :slight_smile:
P.S. here is a nice little racer in PICO-8 format, rather well done I have to admit.

you can make an invisible object that it is trying to follow and when it gets close enough it destroys the object and spawns it in the next point if the map

Wow I’m kind of overwhelmed, but thank you everyone for your help! I will certainly try some of these ideas! (The simpler ones XD)

Go through the comments and take a look in the game. Use enemy 2 or 1. Your welcome.

@RageDayz Here a REALLY simple example.

It is based on @“JR 01” 's homing missile routine. If you extend the proximity sector you get away with 3-4 tracking points that you clone around the track (for sure they should be invisible then).
Then you can also implement other things like acceleration changes and a more fuzzy steering.

Hope this helps