Portfolio-focused 2D arcade racing game built with plain HTML, CSS, and JavaScript.
The repository now includes:
game.html: enhanced and structured version for production/portfolio usagev1tov4: original progressive versions kept for reference
Author: sudheerxdev
If this repository is deployed with GitHub Pages, open:
https://sudheerxdev.github.io/car-game-/game.html
- Refactored monolithic script into modular runtime files under
src/game/ - Added a proper game state flow:
menu -> countdown -> running -> paused -> gameover - Added nitro system with drain/recovery behavior
- Added car integrity (health) and damage handling
- Added combo and near-miss scoring mechanics
- Added dynamic difficulty progression over time
- Added persistent local records (best score, distance, time, lap)
- Added modern responsive layout and touch controls
- Kept legacy versions available for comparison
- Move:
Left/Right ArroworA/D - Accelerate:
Up ArroworW - Brake:
Down ArroworS - Nitro:
Space - Pause/Resume:
P - Restart run:
R - Start run:
Enteror on-screen button
car-game-/
|- game.html
|- index.html
|- common.js
|- common.css
|- styles/
| |- game.css
|- src/
| |- game/
| |- config.js
| |- state.js
| |- track.js
| |- traffic.js
| |- renderer.js
| |- gameplay.js
| |- ui.js
| |- app.js
|- images/
|- music/
|- v1.straight.html
|- v2.curves.html
|- v3.hills.html
|- v4.final.html
- Clone repository:
git clone https://github.com/sudheerxdev/car-game-.git - Open
index.htmlor directly opengame.htmlin your browser.
No build tools or frameworks are required.
MIT License. See LICENSE.