A classic VIC-20 inspired city bomber game built with HTML5 Canvas and JavaScript. Destroy buildings, avoid hitting the ground, and shoot the gorilla for bonus points!
| Feature | Description |
|---|---|
| Airplane | Flies across screen, drops one level each pass |
| Buildings | Random heights, windows light up |
| Gorilla | Walks on buildings, bonus points when shot |
| Scoring | 10 pts per hit, 100 pts for destroyed building, 500 pts for gorilla |
| High Scores | Top 10 scores saved locally |
| Responsive | Works in any modern browser |
- Open
index.htmlin your browser - Click anywhere on the game canvas to drop a bomb
- Press SPACEBAR to drop bombs from the plane
- Destroy all buildings to advance to the next level
- Shoot the gorilla for 500 bonus points
- Don't hit the ground or it's game over!
| Control | Action |
|---|---|
| Mouse Click | Drop bomb at click location |
| Spacebar | Drop bomb from plane |
| Target | Points |
|---|---|
| Building hit | 10 pts |
| Building destroyed | 100 pts |
| Gorilla shot | 500 pts |
| Level complete | 1000 pts |
city-bomber-game/
├── index.html # Main game file
├── README.md # This file
└── screenshot.png # Game screenshot (add yours)
- HTML5 Canvas - Game rendering
- JavaScript - Game logic
- LocalStorage - High score persistence
- CSS3 - Styling and animations
-
Clone the repository:
git clone https://github.com/pythonandyou/city-bomber-game.git cd city-bomber-game -
Open
index.htmlin your browser:- Double-click the file, OR
- Run a local server:
python3 -m http.server 8000 - Navigate to
http://localhost:8000
- Push to GitHub
- Go to repository Settings → Pages
- Select source:
mainbranch - Your game will be live at:
https://pythonandyou.github.io/city-bomber-game/
This project showcases:
| Skill | Application |
|---|---|
| Canvas Animation | Smooth game rendering |
| Game Loop | RequestAnimationFrame |
| Collision Detection | Object intersection |
| State Management | Game states, scores |
| Local Storage | Persistent high scores |
| Event Handling | Keyboard, mouse input |
| Responsive Design | Flexible canvas |
Want to modify the game? Here are some ideas:
- Change colors - Edit the CSS variables
- Adjust difficulty - Modify plane speed, bomb speed
- Add power-ups - Extra bombs, slow motion
- Add sound effects - Use Web Audio API
- Add levels - Different building patterns
- Sound effects
- Multiple levels with increasing difficulty
- Power-ups (extra bombs, shields)
- Mobile touch controls
- Online leaderboard
pythonandyou - GitHub
This project is open source and available under the MIT License.
Built with ❤️ for retro gaming enthusiasts