Can anyone drive a car and a tank?

Defining tracks

I create three track tools, after all, cars with no track wouldn’t be much fun.

The polygon was the first, and it intentionally creates them misshapen to stop the AI from learning constant angles. I don’t think there’s much use in adding yet another screenshot. There are no “options”, it simply picks a random number of sides, and creates it with random indentation of corners.

Whilst polygons were a great start. But it would be fun to try more complex shapes. So I made a rough tool to draw tracks.

It puts a horizontal start piece. Simply click where you want the track to go next, and repeat. When you’re done, press [Escape].

Lastly, you can construct tracks using 90-degree bends, and straight lines. When you click the first square it highlights with a pink box where you can position a piece next. The arrow keys work too. When you get near to closing the loop, the [Escape] key finishes drawing. The direction painted determines the direction the cars go.

Tracks can be saved and loaded later.

How the shapes are rendered, will be covered in the “Technique” section at some point in the future.

On the next page (5) I’ve tried to answer a few questions.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *