Simple Space Game is a lightweight side-scrolling shooter built with TypeScript and vanilla JavaScript. The project aims to keep controls responsive in the browser while staying small enough for learners to explore.
Note: This project is part of an assistant-tooling evaluation. Vibe coding with Cursor, Warp, Google Antigravity, and OpenAI Codex to support development on this repo.
- Move: Arrow Up / Arrow Down
- Shoot: Spacebar
- Pause/Exit: Escape
- Touch: Tap or hold the left side to move the ship (above the ship to go up, below to go down) and tap the right side to fire.
- Responsive canvas sizing for desktop and mobile
- Keyboard and touch controls with smoothing for steady movement
- Orientation guard that prompts mobile players to rotate to landscape
- Lightweight build pipeline powered by Vite
- Install dependencies:
npm install
- Start the dev server with hot module replacement:
npm run dev
- Create a production build (outputs to
dist/):npm run build
- Preview the built bundle locally:
npm run preview
- Source files live in
src/with the entrypoint atsrc/main.ts. - Tests are colocated under
tests/and run through Vitest. - The game canvas and overlay elements are defined in
index.htmland styled insrc/style.css.