Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Asteroid Game

A vibrant, arcade-style 2D space shooter. Fly a neon starfighter, dodge and blow up asteroids, and dogfight computer-controlled AI across escalating waves. Includes synthesized retro sound, demo/attract mode, and mobile/touch controls.

Features

  • Fast, responsive flight with thrust/turn physics and screen wrap
  • Asteroids that split into smaller fragments on hit
  • AI ships that chase, align, and fire at the player
  • Regenerating shields, limited lives, waves, scoring, and particle explosions
  • Neon UI with starfield, animated grid, glows, and gradient accents
  • Retro Web Audio SFX: shots, explosions, thrust, UFO hum, classic heartbeat
  • Demo/auto-play mode with idle auto-start on Game Over (attract mode)
  • Mobile/touch controls (rotate, fire, thrust, pause)

Tech Stack

  • HTML5 Canvas for rendering
  • Tailwind CSS (CDN) for UI overlays
  • Vanilla JavaScript

Quick Start

  1. Clone or download this folder.
  2. Open index.html in a modern desktop browser (no build required).

If you prefer a local server, run any static server (e.g., python -m http.server) and open the served index.html.

Controls

  • Desktop
    • Move: WASD or Arrow Keys
    • Shoot: Space
    • Boost: Shift
    • Pause: P
  • Mobile
    • Rotate: on-screen ⟲ ⟳ buttons (bottom-left)
    • Fire: on-screen ● button (bottom-right)
    • Thrust: on-screen ▲ button (bottom-right)
    • Pause: on-screen II button (right-center)

Gameplay

  • Destroy asteroids and enemy ships to earn points.
  • Asteroids split into smaller chunks; clear the wave to progress.
  • Shields regenerate slowly; losing all lives ends the game.

Project Structure

.
├── index.html                 # Canvas + UI overlays (Tailwind via CDN)
├── game.js                    # Game loop, entities, physics, collisions, AI, audio, mobile
├── IMPLEMENTATION_SUMMARY.md  # Detailed technical overview
└── README.md                  # You are here

Notes

  • Runs entirely client-side; no dependencies or build step.
  • Demo mode can be toggled with Z from non-play screens; auto-starts after ~12s idle on Game Over.
  • Mobile spawns tune counts and avoid the bottom control zone for clarity.

Further Reading

  • See IMPLEMENTATION_SUMMARY.md for architecture, design decisions, and extensibility ideas.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages