# Asteroids

> Pilot your ship through an asteroid field in this classic arcade space shooter. Retro vector graphics with smooth keyboard controls.

- Open the tool: https://overtooled.com/asteroids
- Category: Games
- Privacy: Runs entirely in your browser. Nothing is uploaded, no account is needed, and it works offline once loaded.
- Price: free, no sign-up
- Keywords: asteroids, game, space, shooter, arcade, classic

## In short

Play the classic Asteroids space shooter with retro vector graphics.

## Overview

Classic Asteroids on a 640x480 field. Pilot a ship with momentum, shoot asteroids that split into smaller pieces, and clear each wave. You have 3 lives; the game ends when they run out.

## Features

- Momentum physics: thrust adds velocity in the facing direction, and gentle friction slowly bleeds speed off
- Ship, bullets and asteroids wrap around the screen edges
- Large asteroids split into 2 medium, medium into 2 small; small ones are destroyed
- Points: 20 for large, 50 for medium, 100 for small asteroids
- Wave 1 has 5 large asteroids; each new wave has one more (4 + wave number), spawned at least 150px away from the ship
- Hold fire for auto-fire (one shot every 9 frames, at most 6 bullets on screen)
- About 2 seconds of blinking invincibility at the start and after losing a life
- Best score saved on the device

## How to use it

1. Press Start Game (or Space).
2. Turn and thrust to move; hold fire to shoot.
3. Break every asteroid to start the next wave.
4. Avoid collisions: each hit costs a life and respawns you in the centre.

## Inputs

- Keyboard: Left/Right or A/D turn, Up or W thrust, Space or Enter fire (hold for auto-fire)
- Touch: on-screen joystick turns the ship toward the stick direction and thrusts when pushed past about 55% of its range; hold the Fire button to shoot

## Outputs

- Score, lives left and best score
- Final score on the Game Over screen

## Limits and notes

- Asteroid speeds do not increase between waves; later waves only have more asteroids
- Best score is stored in localStorage (overtooled:asteroids:best)

## Keyboard shortcuts

- Left / A, Right / D: turn
- Up / W: thrust
- Space / Enter: fire (hold for auto-fire); also starts the game from the title screen
- Esc / P: pause and resume

## Questions and answers

### How does Asteroids work?

A requestAnimationFrame loop simulates thrust with momentum and light friction on a canvas. The ship, bullets and asteroids all wrap around the screen edges. Asteroids are irregular polygons with 8-11 vertices. A bullet hit is a distance-versus-radius check; large asteroids split into two medium ones and medium into two small ones.

### What are the controls?

Left/Right or A/D turn the ship, Up or W thrusts, and Space (or Enter) fires; hold it for auto-fire. Thrust pushes you the way you face and you keep drifting, slowing gradually. On touch screens the joystick aims the ship and thrusts when pushed far enough, and you hold the Fire button to shoot.

### How do I score points?

Shoot asteroids: large ones are worth 20 points, medium 50 and small 100. Clear every asteroid to start the next wave, which has one more large asteroid than the last. You have 3 lives.

### Does the screen wrap around?

Yes. Flying off one edge of the screen brings you back on the opposite side, just like the original arcade game. Bullets also wrap around the screen.

## Related tools

- [Block Drop](https://overtooled.com/block-drop.md): Stack falling tetrominoes to clear rows with keyboard controls and high scores
- [Pong](https://overtooled.com/pong.md): Play classic Pong against a CPU opponent, first to 7 wins
- [Snake](https://overtooled.com/snake.md): Classic snake game with increasing speed, swipe controls, and high score tracking
- [Farkle](https://overtooled.com/farkle.md): Push your luck in this classic dice game -- roll, score, and bank before you farkle

---
Overtooled: 179 free tools that run in your browser. Index of all tools: https://overtooled.com/llms.txt
