Author Message

amilmand

00
Posts: 259

Location: ---
Occupation:
Age:
V$:
#135436   2018-01-09 19:20          
Well Valocity is different from other tracks I noticed that even if you drop an AI racer somewhere far from his intended spline it will navigate the track relatively competently meaning it wont collide with buildings and will try to avoid traffic, and will eventually get on-track and follow that, nevertheless if the spline goes through a building the car will try to do the same. This is probably done by utilising additional data telling the cars where the roads are (this should be the city.trc).
On regular tracks the AI will calculate the nearest point on the spline and full throttle straight to that point and after reaching it follows the spline as usual. There is another thing worth mentioning the AI does not care for the order of the control points they do not act like checkpoints; at a point where the spline is self-intersecting the cars momentum will decide which "branch" will be taken (thou that usually will be the logical one) if you have two segments running parallel to each other but with opposite normals (like a very narrow oval track) it can easily happen that the AI chooses the wrong branch turns around and simply ignore the other.
However you can use this behaviour as a "feature" aswell, in one of the races in SlrrExhaustive there is a jump over a fence that not all ai-cars can make on the first try mostly because they interfere with eachother, the ones that cant make it crash to the fence but I made a loop in the spline so the ones not making the jump will in time inch there way nearer to the other "branch" and will chose that to follow which will loop them around to try the jump again. The point here is that the loop(a part of the otherwise continuous spline) is not taken by all the cars (ignored by the ones that jump over and closer to a "later" part of the same spline).


Added 38 minutes later:

I watched the video only now realised that its a link
This is possible in Slrr without decoding the trc file format but would need the script of the track to manage the "traffic" cars only keeping in the game the ones near the player but they would need to be full AI racers "sitting" in traffic cars and that would mean numerous AI_spline commands which is unstable so it would be better with a .trc and regular traffic code in the background.

This post was edited by amilmand (2018-01-09 19:59, ago)