JS-games icon indicating copy to clipboard operation
JS-games copied to clipboard

Car racing game

Open Surajvatsya opened this issue 4 years ago • 5 comments

Proposal

I'm designing a js car racing game. In this game, player is in a race track protecting himself from collision from other cars coming on the way.

This game is purely coded on javascript language and a little bit of CSS is used for styling backgrounds and all. First of all, I have designed a div by name “carGAme”, after that a new div of “gameArea” I made, followed by “startScreen” div where you got instruction of how to play this game and finally a div for displaying the score.  I have fired an event on arrow keys, arrowDown for getting back on road, arrowup for move ahead ,arrowleft & arrowRight for left & right direction respectively. When we started game I put player.score value=0, now I have designed 5 road line & through a call back function we have repeated it in gameArea. After this I put 3 enemy car on road and repeat it until collision take place. Now defined the speed of player as 5px and increases player score until he quit/collide. When collision take place startScreen again come on top of screen showing final score and instruct user to play again

Hit this link to play game:- https://car-racing-app-surajvatsya.herokuapp.com/

image

Surajvatsya avatar Jul 28 '21 15:07 Surajvatsya

Hello there!👋 Welcome to the project!🚀⚡ Thank you and congrats🎉 for opening your very first issue in this project. Please adhere to our Code of Conduct. Please make sure not to start working on the issue, unless you get assigned to it.😄

github-actions[bot] avatar Jul 28 '21 15:07 github-actions[bot]

@geekymeeky please assign it to me, it has been more than 4 days.

Surajvatsya avatar Aug 01 '21 11:08 Surajvatsya

@Surajvatsya we already have a car game that is quite similar to this one. You can modify the existing game to add features. Let me know if you need suggestion

geekymeeky avatar Aug 01 '21 15:08 geekymeeky

Can I work on this issue @geekymeeky ?

aditya687 avatar Aug 02 '21 14:08 aditya687

@geekymeeky please suggest to me, what can I do to enhance that game.

Surajvatsya avatar Aug 03 '21 14:08 Surajvatsya