Skip to content
Sign upLog in

Space Shooter

Profile icon

Move your unrealistic ship and shoot unrealistic lasers at unrealistic enemy ships that are also the same unrealistic shape as yours!

  • WASD to move
  • Space to shoot

Triangle collision was too hard to implement so I took the obvious fix: use rectangular bounding boxes and make them smaller.

You are viewing a single comment. View All
Profile icon

Found a bug where if you leave it on and switch to another tab, enemies will keep spawning. requestAnimationFrame() stops working when you switch tabs to conserve battery, so your main loops, which I'm assuming use requestAnimationFrame, will pause after you switch tabs, but I'm guessing your enemy spawning loop uses setInterval().

This is a minor bug, but I'd suggest putting the enemy spawning mechanism in the requestAnimationFrame as well. Otherwise depending on computer speed and other factors, enemy spawning will not be consistent