Space Shooter Game

Game Features

Assets and Sprites

  • Player Spaceship: A white triangular shape created with triangle().
  • Enemies: Three types with unique shapes and colors:
    • Type 1: Green rounded rectangles (rect()).
    • Type 2: Blue ellipses (ellipse()).
    • Type 3: Purple downward triangles (triangle()).
  • Bullets: Blue rectangles for the player and red rectangles for enemies, drawn with rect().
  • Background: A gradient from dark blue to black with 100 randomly placed white stars, rendered once into a createGraphics buffer.

Gameplay Mechanics

  • Controls:
    • Move left/right with arrow keys.
    • Shoot with the spacebar (32 key code), limited by a cooldown.