Actually the first application I wrote for Pong Board from Conrad was a “car race”. This was mostly a quick & dirty prove of concept. I wanted to test the board and learn some basic features of atmega8. By the way I’ve never wrote a single code for atmega µControler before
.
Any way here you have a next version of Need for Speed with a huge screen resolution of 12×10 pixels.
http://www.youtube.com/watch?v=9cIecm-IPiI
Download the bascom source and hex files from here.
Although it was only a quick attempt to make something different from ping-pong and a learning by doing approach You can find in the source code some interesting parts.
1) I’m initializing the random generator based on the value from ADC in order to make the road different each time.
2) The road is calculated in that way that there is always enough pleace for the car. The road outline/direction changes at least after two steps forward, in order to avoid a rapid changes left-right-left-right.
Probably I will rewrite this in c and add some more features