I have built a car collision game which uses JavaScript concepts for its working and HTML, CSS are used for its structure and designing. I have created this game with a clean user interface that can be used by users easily. I will start by creating the HTML layout first that defines the structure of the game, make it look good by styling using CSS and then write the game logic for all the functions in JavaScript. I have used Play/pause button for better interaction. I am also calculating the live scores for the session. It is a typical car collision game which I are playing from our old times in the keypad phone. In order to play this game, you must click on the start button then play button. You can play this game with the arrow keys and touch pad for moving left, right. When your car collides with another car coming from opposite direction, you will lose. And the score and restart button displayed on the screen.
This game reinforces JavaScript concepts for running the game. In this game, You have a car and its work is not to collide the vehicle coming from different direction. To play the game, I must follow these steps:-
• Firstly, you will see the display screen consisting of three buttons start, help and exit.
• To start the game, I need to press START BUTTON and then PLAY BUTTON.
• If you want to see the instruction of the game press the HELP BUTTON.
• If you want to exit the game press the EXIT Button.
• To move the car, use “left arrow” for left, “right arrow” for right.
• The aim of the game is to avoid the car coming from different direction.
• You get scored according to the avoiding the car.
• There is no concept of lives, once your car collides to another vehicle, the game overs here.
• At the end you’ll see the GAME OVER!!! Message and the RESTART BUTTON.
you can read full documentation of this project here