Space Brick

Space Brick v1.0

Space Brick v1.0 was the first project I ever developed. It was written in Java over a two-year period, from 2014 to 2016. The game is a top-down shooter featuring self-made art assets, a rudimentary engine, and essentially no gameplay.

Video tour of Space Brick v1.0

Most of the content in Space Brick v1.0 is held entirely within its menus. I attribute this bias to my lack of programming experience: menus are simple elements with clearly-defined states, making them very easy to understand for programmers still learning object-oriented design. That being said, menus gave me the space to learn encapsulation, delegation, canvas rendering, and basic programmatic animation. I even made a font and a method to render strings per-character.

Once I knew how to implement menu elements, I added gameplay in much the same way. I created an element to serve as the game world, and then made each entity a child of that element. To enable collision, I added hitboxes to each entity, and then resolved collisions by performing one check for each pixel of movement. While very inefficient, this system did work due to the game’s low entity count.

My last addition to Space Brick v1.0 before moving on to its successor was adding weapons, aiming, and shooting to the player controller, completing my prototype.


Space Brick v2.0

Space Brick v2.0 was my attempt to refactor and improve the underlying engine architecture of the original Space Brick. It was developed over one year, from 2016 to 2017, using some of the old code and assets from Space Brick v1.0.

Video tour of Space Brick v2.0

The big issue with Space Brick v1.0 was that the entire game world was measured in pixels, since everything in the game itself was essentially just a glorified menu asset. To solve this problem, I decided that I would draw the screen indirectly: first I would draw to a placeholder image, and then I would resize that image to fit the screen.

As part of my refactor, I fully documented and organized my engine code. I also remastered the player and weapon sprites, adding a number of new weapons and making the animations smoother. Space Brick v2.0 also saw an important shift in my focus to actually implementing a game. Space Brick v2.0 has an actual level, built by dividing the level into 16×16 chunks, and then loading a tile set using a text file filled with tile IDs.

For my final addition, I added a giant eyeball enemy and put it in an empty arena to test out combat. It worked, but with the newly-expanded level, the cracks built in to the system were starting to show. With my academics demanding more and more of my time, I decided to stop development.