arrow_back Back to Projects
JavaScript Canvas API Game Dev

X Shooter

Browser-based arcade game with spaceship navigation, enemy AI, and score tracking built with vanilla JavaScript.

X Shooter screenshot

X Shooter

A classic, browser-based 2D arcade game featuring spaceship navigation, enemy AI, collision detection, and score tracking, all built from scratch using vanilla JavaScript and the HTML5 Canvas API.

Architecture & Implementation

The game loop is the core of this project, utilizing requestAnimationFrame for buttery smooth 60FPS rendering.

  • Rendering Engine: HTML5 Canvas API
  • Game Logic: Vanilla JavaScript (ES6+ Classes)
  • Mechanics: Custom physics for movement, projectile trajectory math, and AABB (Axis-Aligned Bounding Box) collision detection between the player, lasers, and enemies.
  • State Management: Encapsulated score and wave tracking without external libraries.