Top-down tank shooter built with HTML5 Canvas, CSS, and modular vanilla JavaScript. The project runs without a build step and is organized into focused runtime modules for config, input, entities, rendering, UI, and game flow.
You control a player tank in an arena survival loop:
- survive increasingly harder waves
- fight enemy archetypes with different behavior
- clear boss waves every 4 rounds
- use missile and shield skills to stabilize difficult fights
- pick 1 of 3 upgrades between waves to shape the run
- 3 difficulty levels with separate high score storage
- Score-based tank progression (
Lv1 -> Lv3) with different visuals and fire patterns - Wave system with preparation phase, combat phase, and boss waves
- Enemy archetypes:
Rusher: fast pressure unitGunner: ranged strafing unitTank: slow heavy bruiserBoss: multi-shot elite that appears every 4 waves
- Interactive map elements:
- destructible crates that block movement
- explosive barrels with chain-reaction damage
- oil spills that slow tanks moving through them
- Between-wave upgrade draft with 3 random choices
- Loot system:
HP,Speed,Damage,Missile - Active skills:
Missile: area-damage explosive shotShield: timed protection with cooldown
- Pause, restart confirmation, and game-over report flow
- Custom key binding settings for
MissileandShield - Dynamic controls hint that updates when key bindings change
- Local storage persistence for high scores and key bindings
| Action | Default |
|---|---|
| Move | WASD or Arrow Keys |
| Shoot | Space |
| Aim | Mouse |
| Missile | F |
| Shield | G |
| Pause / Resume | P |
| Restart prompt | R |
| Upgrade choice | 1 / 2 / 3 |
| Open settings | bottom-left settings button |
Notes:
Missilecan be rebound toMouse Leftin the settings modal.- When
Missileis bound toMouse Left, normal shooting remains onSpace.
No install step is required.
Open index.html in a browser.
python -m http.server 8080Then open http://localhost:8080.
.
|-- index.html
|-- README.md
|-- src
| |-- css
| | `-- style.css
| `-- js
| |-- config.js
| |-- entities.js
| |-- game.js
| |-- input.js
| |-- render.js
| `-- ui.js
|-- public
| `-- assets
| |-- custom-icons
| |-- kenney_board-game-icons
| |-- kenney_top-down-tanks-redux
| `-- tank-pack
`-- Effects_v05_Publish.psd
src/js/config.js: constants, asset paths, storage keys, shared helpers, enemy archetypes, upgrade poolsrc/js/entities.js: runtime state factories, player/enemy/bullet/loot logic, map obstacles, wave planning, upgradessrc/js/render.js: asset loading, background generation, obstacle/tank/effect renderingsrc/js/input.js: keyboard, mouse, modal handling, key rebindingsrc/js/ui.js: DOM references, HUD updates, upgrade modal rendering, dynamic hint textsrc/js/game.js: boot flow, reset logic, main loop, wave progression, game-over handling
If you want to rebalance or extend the game, these are the main places to touch:
src/js/config.jsLEVELS: difficulty tuningENEMY_ARCHETYPES: enemy roles and combat profileUPGRADE_POOL: between-wave upgrade choicesASSET_PATHS: sprite/icon mapping
src/js/entities.jscreatePlayer(): base player statscreateMapObstacles(): arena layout and interactive propscreateWavePlan(): wave pacing and boss insertionapplyUpgrade(): how upgrades affect the run
src/js/game.jsprepareWave(): wave setup flowspawnWaveEnemies(): spawn pacingupdateRun(): high-level game progression
- Tank and environment sprites: Kenney
- Board game icons: Kenney
- Custom missile and shield icons: local project assets in
public/assets/custom-icons
Included Kenney asset packs are distributed with their own license files in the asset directories. Check those files before redistributing the raw asset packs outside this project.