Skip to content

A classic arcade-style asteroids shooter game built with HTML, CSS, and JavaScript. Control a spaceship with keyboard keys, destroy asteroids, and avoid collisions to achieve the highest score. Features retro visuals, live scoring, progressive difficulty, and two unique AI-generated versions.

Notifications You must be signed in to change notification settings

omkaarvd/asteroid-destroyer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Asteroid Destroyer Game

A classic arcade-style space shooter game where players control a spaceship to destroy asteroids while avoiding collisions. This project features two different implementations of the same game concept, each generated by a different AI model.

Game Versions

This project includes two versions of the game:

  1. Claude 3.7 Sonnet Version: A retro-styled implementation with green terminal aesthetics and minimalist design.
  2. Gemini 2.5 Pro Version: A more graphically styled implementation with cyan ship colors and a more modern UI look.

Both versions offer the same core gameplay but with different visual styles and slight variations in mechanics.

Features

  • Spaceship Controls: Navigate through space using directional controls
  • Weapon System: Shoot lasers with cooldown mechanics
  • Asteroid Physics: Asteroids split into fragments when destroyed
  • Scoring System: Earn points by destroying asteroids and fragments
  • Lives System: Limited lives with visual indicators
  • Hyperspace Jump: Emergency teleportation with cooldown and malfunction risk
  • Progressive Difficulty: Increasing challenge as you play longer
  • Responsive Design: Adapts to different screen sizes

Game Controls

Action Keys
Move Forward Up Arrow, W
Turn Left Left Arrow, A
Turn Right Right Arrow, D
Fire Laser Spacebar, Z
Hyperspace Jump H

How to Play

  1. Open index.html in your browser
  2. Choose your preferred AI-generated version (Claude or Gemini)
  3. Use the controls to navigate your ship and destroy asteroids
  4. Avoid collisions with asteroids and their fragments
  5. Use hyperspace jump as a last resort (has cooldown and may malfunction)
  6. Try to achieve the highest score possible!

Technical Implementation

The game is built using:

  • HTML5 for structure
  • CSS3 for styling and animations
  • Vanilla JavaScript for game logic and physics
  • No external libraries or dependencies

Both versions implement:

  • Collision detection systems
  • Particle effects
  • Physics-based movement
  • Game state management
  • UI/UX elements

Installation

No installation required! Simply download the project files and open index.html in any modern web browser.

Browser Compatibility

The game works best in modern browsers that support HTML5 and CSS3:

  • Chrome (recommended)
  • Firefox
  • Edge
  • Safari

Development Notes

This project demonstrates two AI approaches to implementing the same game concept. Key differences include:

  • Visual styling
  • UI layout
  • Physics implementations
  • Code structure and organization

Credits

This project was created as a demonstration of AI-generated game development:

  • Claude 3.7 Sonnet version - Created by Anthropic's Claude AI
  • Gemini 2.5 Pro version - Created by Google's Gemini AI

Inspired by the classic arcade game Asteroids.

About

A classic arcade-style asteroids shooter game built with HTML, CSS, and JavaScript. Control a spaceship with keyboard keys, destroy asteroids, and avoid collisions to achieve the highest score. Features retro visuals, live scoring, progressive difficulty, and two unique AI-generated versions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages