Racing a.i
Any pointers please on how to go about making a.i that will race around the track dynamically reacting to other cars and players.
I'm not worried about weapons but would like them to race aggressively and avoid obstacles and adapt to events like track changes rather than just drive around on a fixed path (which I'm also not really sure how to do tbh).
I'm guessing I start with the laser scope but haven't got the first clue where to start so any ideas gratefully received thanks.
-
This has been my bane for some time now. I imagine theres quite a bit of overlapping logic involved to consider many conditions and priorities. Hopefully you can get some answers soon!
-
A simple way is to use the action recorder and randomizer maybe. Create different recorded ways and let the randomizer decide how will the car drive in the next round. But this is very basic.. an complex a.i needs more complex logic.
You could also test things with the follower, tags and rotator.? -
One of the MM team named Christophe created the navigation AI. which could definitely work in this situation. idk if anyone else attempted it yet. hopefully he sees this,
-
What I would do in this situation is use multiple laser scopes on the body of the a.i. car.
Then set the hit distance to the turning strength of the vehicle
That way when a laser scope senses a wall or another car getting close to the right side of it, it will start to move to the left.
if the car turns too sharp when getting a signal from the laser scope, just throw a calculator between the laser scope and the turning method and adjust how much you want the signal to be divided by until you get the results you want.
You could even go one further and set up a modifier for the calculator based on speed by setting up two key frames (set to keep changes) and then in one key frame, go into the calculator and set the division value to 0 and then in the other key frame set it to 100 for example. Then set up a movement sensor and connect the velocity to a splitter and set the positive signal to one key frame and the negative to the other key frame. This should make your a.i. feel a lot more responsive.
Hope this helped :) -
Thanks, I'll try and see if I can work those suggestions out. Also puzzled how to make them only go around the track one way though ?
-
'+1 on @ROLLIN_20FOES comment.
In the tower defense game im making, I used laser scopes to follow the path I created. It works extremely well.
Войдите в службу, чтобы оставить комментарий.