Getting AI’s Running in Metric Racer. RT gives a quick snap shot of all of it over at his dev blog.
The extent of any AI I’ve ever written is mashing together macro’s in excel to streamline complicated tasks.
So when it came to developing an AI for Metric, I decided the best foot forward was too keep it simple and build on that.
Follow the Bread Crumbs
I set it up that each track will need a set of ‘nodes’, the green tennis balls in the image below. The node’s are no different than any other track/sandbox item, and can be added, edited and deleted in the same fashion as the rest of the track parts.
Once the track nodes were initialized, it was as simple passing the list of nodes as a ‘List’ collection and have each ship individually chase after the nearest node. Once it reached a certain threshold of minimum distance, it would increment up the list to the next ‘Node’. You can see the first iteration…
View original post 75 more words