An exercise in over-engineered game programming

Squares in Space

Click to play in browser (Requires keyboard)

https://github.com/rogersavage/squares_in_space/

As a learning exercise in some object-oriented programming techniques, as well as to spend some time getting more comfortable with Javascript, I decided to develop a small browser game. My main interest was in understanding how message passing can work in practice, and to experiment with dependency injection, but I came away with many other lessons about program organization, especially decoupling. The code got a little messy as I sprinted to the finish line, adding features to make a complete and interesting game, but I’m going back now to improve it and write a more in-depth post describing what I learned.

It’s a reasonably complete and interesting game as it is at the moment, although as an experiment in OOP techniques it is not appropriately designed or optimized in any way, aside from some crude hacks that attempt to keep the frame rate from dropping as the number of entities increases. I can’t guarantee it will work well on many systems or in many browsers, but turning off the special effects will probably help.

Beware the screeen edges, don’t be greedy, and don’t rely too much on the teleporter. The best score I’ve gotten so far is 1019.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top