← Back to work

AsteroidsArcade physics in Java

Arcade physics in Java

Asteroids

  • Java
  • JavaFX
  • Canvas (web port)

Overview

The arcade classic, built in Java with JavaFX: a ship with thrust and rotation, wrapping vector movement, bullets, and asteroid collisions. One of my early projects — clip below, source on GitHub.

Demo

Shoot the asteroids · they split, then vanish

← → rotate · ↑ thrust · Space shoot  ·  or tap the buttons

Highlights

  • Vector movement with screen-wrap, frame-based rotation + thrust, and projectile/asteroid collision detection.
  • Pure Java + JavaFX, no engine — the game loop and physics are hand-rolled.
  • An early project that made the math-meets-code loop click for me.