geekymeeky / JS-games

A curated collection of games made with javascript and integrated by a web UI.
https://geekymeeky.github.io/JS-games/
MIT License
34 stars 35 forks source link

Car racing game #120

Open Surajvatsya opened 3 years ago

Surajvatsya commented 3 years ago

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

github-actions[bot] commented 3 years ago

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.😄

Surajvatsya commented 3 years ago

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

geekymeeky commented 3 years ago

@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

aditya687 commented 3 years ago

Can I work on this issue @geekymeeky ?

Surajvatsya commented 3 years ago

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