A vector siege shooter for the browser. Blast through spinning energy rings, take out the gun at the core and dodge the homing mines it sends after you, all drawn in glowing vector lines.
- Rotating ring defences. Three energy rings spin in alternating directions, and each has a gap. Wear them down or slip shots through the openings.
- A gun that shoots back. The core turret tracks your ship and fires faster on every level.
- Homing mines. The keep releases mines that chase you down, up to five at a time.
- Inertia flight. Thrust, drift and wrap around the edges of the screen.
- Shield. Hold it to absorb shots, mines and ring contact. It drains energy while up and recharges when lowered.
- Escalating levels. Destroy the core to clear the keep. The next one spins faster and fights harder.
- Local high score. Saved in your browser.
- No engine, no assets. Plain TypeScript and Canvas 2D. Every sound is generated with the Web Audio API.
| In your browser | vedjuk.github.io/Vector-Keep → |
| Locally | npm install then npm run dev |
Vite prints a local URL (usually http://localhost:5173). Press Space or Enter to start.
| Action | Keys |
|---|---|
| Start / restart | Space, Enter (or R on the game-over screen) |
| Rotate | ← → or A D |
| Thrust | ↑ or W |
| Fire | Space (up to 4 shots on screen) |
| Shield | Shift (hold) |
| Pause | P |
| Target | Points |
|---|---|
| Ring hit | 12 |
| Core hit | 80 |
| Mine | 150 |
| Keep destroyed | 800 |
| Command | Description |
|---|---|
npm run dev |
Dev server with hot reload |
npm run build |
Typecheck, then production build to dist/ |
npm run preview |
Serve dist/ locally (a good check before deploying) |
Requirements: Node.js 20+ (LTS recommended).
Most of the game feel (ship handling, shield drain, ring spin, turret fire rate, mine speed, scoring) can be tuned from src/game/constants.ts.
src/
main.ts # Canvas + game loop bootstrap
game/ # Fixed-step loop, tuning constants, Game orchestration
entities/ # Ship, bullets, castle (rings + core), mines
systems/ # Input, collision
render/ # Canvas drawing (vector look, HUD, title)
audio/ # Web Audio beeps
GitHub Pages (this repo): every push to main runs .github/workflows/deploy-pages.yml, which runs npm ci and npm run build and then publishes dist/. In the repo's Settings → Pages, set Source to GitHub Actions.
vite.config.ts sets base to /Vector-Keep/ so asset URLs match https://vedjuk.github.io/Vector-Keep/. If you fork or rename the repo, change base to /<your-repo-name>/ (with the trailing slash).
Other hosts: run npm run build, then upload the contents of dist/ to any static file host. For a site at the domain root, use base: '/'.
Vector Keep is inspired by the vector coin-op games of the late '70s and early '80s. It is not affiliated with any rights holder, and it uses no original ROM assets, logos or sampled audio.
MIT. The license covers this project's source code and assets only. It grants no rights in third-party trademarks or in the classic games that inspired this tribute.
