View Single Post
Old 14 April 2020, 01:18   #8
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,301
don't do like I did with my Supercars III remake. Geometric zones that you could "tunnel" though because they were triangles (and the lap isn't validated)... Apart from that I did exactly how everyone is telling you do do, and it works.

Use an unshown picture with color codes for walls, bridges, etc... and for each lap note the zones that you have to pass on with another color too. The test is instant, too.

Guiding computer cars isn't trivial either. One way I successfully implemented in SCIII is to make them aim a point on the road, then another, then another. Problem with that approach is that the cars never deviate too much from the same trajectory. Target the next point as soon as you're close enough to the current point (so if cars collide, they're not going backwards to validate the point)

It was my first big project (in Java, on windows) and I didn't think I could manage with the pseudo-AI and track laps and all, but I ended up completing it

Implementing real AI for computer cars is another story! (can be done of course, there's an open source 3D racer which does that, I didn't even dare looking at the code)
jotd is offline  
 
Page generated in 0.05507 seconds with 11 queries