Lesson 2
 

 

Now we do what is easily the most abused and underrated (in importance) LP's of them all, the Maxrace and Minrace.

These must always be taken seriously for good AI.

Maxrace = left side of track
Minrace = right side of track

It does not matter if track goes anti-clockwise or clockwise.

I have fixed so many AI that have been released with tracks because of bad Maxrace and Minrace lines its not funny.

One track had perfect AI LP lines for the other 5 LP's yet the Maxrace and Minrace looked like they had been done by a 5 year old driving GPL for the first time, and drunk at that !

Simply put these LP's tell the AI where they are in relation to the sides of the track and how to get back to where they should be.



.......Some gospel truths ......

Edge of track is done with the centre of the car.

If AI go to the outside of the Max/Minrace.LP's they are "lost" and don't know where to go and may make an attempt to get back to the race.LP or they may not, you may have seen this at some hairpins where they all go off to the outside then just don't move until they disappear.

AI are scared of Max/Minrace.LP's and will slow down if they think they are going to eventually get to those LP's.



.....OK, load up the replay of the maxrace and minrace replays I have done here for the aitest track (duh) and observe the following.....

1/ I run the bulk of the Max/Minrace with the center of the car over the edge of the track.

WHY... Because when the AI go to pass, or move over to take a line for a corner, they go over towards the Max/Minrace.LP and you want it as far away as possible so they dont panic, but not so far that they will run off the road.

2/ When coming up to the inside of a corner (lefthander for Maxrace, righthander for Minrace), you will see that I come across back onto the asphalt about 50 meters before the corner and then cut the corner well onto the grass.

WHY... Sometimes, especially from the start or avoiding an accident, the AI will get stuck over on the Max/Minrace.LP line and this little .LP move back onto the asphalt kicks them back onto the asphalt proper searching for the Race.LP or the Pass.LP instead staying well on the inside and getting thrown outwards at the corner itself and "T" boning another car in the side.

Remember I said that the AI are scared of the Max/Minrace.LP's?, well that is why you cut the corner well over on the grass, you can go as far as you want, the AI will feel safe as they come over towards the inside of the corner (apex) racing line.

3/ When at the hairpin (outside line) you see I stay on the edge to begin with then run wide on to the grass, go wider, then come back onto the edge after the hairpin on the next straight.

WHY... Hairpins are terrible for AI for reasons I will explain at a later stage when doing Race.LP's. What you need to do is when an AI has a moment or gets passed on the inside and goes a bit wide, you need the Max/Minrace.LP to tell him where he should be going by scaring him back onto the track to begin with but if he fails to do this and still goes wider and over the Max/Minrace.LP you hope that he will continue parallel to the track and cross back over your Max/Minrace.LP and then he will happily find his way back onto the track :-)

4/ I go wide onto the grass just before the end of your Max/Minrace replay lap (about 100 meters before) next to the starting area and come back to the edge at the startline.

WHY... At the start of the race the AI have somewhere to go to the side to pass slower starting AI, or you :-) This also looks very realistic too sometimes with fast starting cars darting onto the grass. Of course this isnt possible sometimes a some tracks and sometimes you even have to use the Max/Minrace lines to protect the AI from hay bales etc.

Summary...

Centre of car over edge of track
Cut corners severely
Go wide after about 1/3 way around hairpins
Go wide around start area

So watch the replays below and go to it !

After you convert these to Maxrace.LP and Minrace.LP, go watch your AI from lesson 1 and you will see how much better they work now because they have room sideways because you were using the 1 replay before for all 6 LP's.

(By the way you cant use my replays on purpose, go and do them yourself. :P )


Maxrace replay... aitestmaxrace.zip ( 197.5k )

Minrace replay... aitestminrace.zip ( 177.54k )

 

Go to Lesson 3



Originally posted by Mark Beckman on January 27th 2003 at the M4Driving.it Forum under the thread "Lesson 2"

Posts originally converted to html by Jordi Roda aka runrun.

 

 

 

Webpages and downloads hosted by:

Visit the SRMZ site

under the auspices of:

Visit the BCSims site