Game_final - Game Documentation In this lab we created a...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Game Documentation In this lab we created a car racing game following the rules given. We had to randomly generate the track as well as the traffic. There were 4 levels and 5 speed changes. The winding of the road and the traffic depends on the level. The ratio/percentage for the winding of the road and the generation of obstacles/traffic was given to us. The game goes on for 100 miles, after which the user can continue to play again if he/she wishes to. Also, the game can be reset any time by pressing the external switch. However, if there are four accidents in the game then, the game ends. Again the user can continue if he/she wishes to. An LED lights up for every accident. There are 12 roads displayed. The game begins with reading from the dip switches and then based on the difficulty level the randomness of the track and the traffic is decided. For us, the game begins when the user presses “w”. For moving left “a” is pressed and moving right “d” is pressed. For acceleration “w” is used and “s” is used for deceleration. The car is placed on the end of the board (the 12 th road) and is represented by “XXX”. We used the same library file that we had in LAB 7. We externed code for the uart_init, string and character receive/transmit, displaying digits on the seven-segement display, lightening up the LEDs and the dip switches from the library file to the main program. Our entry program is “Lab 8” where we first start with initializing the I/O port
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/07/2008 for the course CSE 379 taught by Professor Vb during the Spring '08 term at SUNY Buffalo.

Page1 / 2

Game_final - Game Documentation In this lab we created a...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online