Share your repls and programming experiences

← Back to all posts
remarkablemark (25)


Asteroids game from example.

The original game was broken so I made improvements. See repository.


Bug Fixes

  • Decrease ship and particle friction so they can move
  • Improve text readability by giving it a stroke and putting it in front of the layers


  • Render the game full screen
  • Generate asteroids based on screen size
  • Destroy the ship on asteroid collision
  • Improve bounding box collision detection
  • Improve ship speed
  • Randomize the speed of sprites (asteroids and particles)
  • Control ship using arrow keys or WAD; fire bullet with space


  • Refactor to local scope so globals aren't polluted