| <!-- -->Christopher Leggett's Portfolio and Blog<!-- -->

Space Game

January 20, 2021

Check it out on Github!

This is a very simple space shooter game written entirely in JavaScript. The goal of this was not to make a very compelling or ground-breaking game, but to demonstrate what I believe are best practices, based on what I was able to find online.

Animation of playing the Space Game

It was originally built from Microsoft's Web Dev for Beginners repo's javascript game tutorial as a base, but I have expanded on it to the point that not much of the original code is left. It utilizes a spritesheet from Kenney's website, window.requestAnimationFrame() for updating the frame, and some physics calculations to move the objects around at set speed. It uses a Pub/Sub architecture for sending keyboard input as well. You can check out the source code here.