Unity 2D Game 4: Laser Defender

The fourth game we worked on was another game that I spent a lot of my childhood playing. We made a Galaxian/Galaga clone:

My mom’s youngest brother had a Nintendo and lots of arcade ports. When I was young he lived in the condo above my grandmother’s condo and whenever we’d go visit her, I’d ask if I could visit him so we could play games. The game I loved playing the most there was Galaga because of the frantic pace.

As I did last time, I documented the concepts I learned on my github page, but I think the one that will probably get the most use in any games I make going forward is the coroutine. It’s a way of writing a function so that it will do some stuff and then wait until something else happens. Usually we used it to wait a few seconds to add a pause to that particular method.

Below is a video of me playing the version we coded in the class. I hadn’t yet figured out how to get things to look right with the resolution since the instructor had us do a tall arcade-style screen. Computers expect to play horizontal games so it didn’t want to cooperate at first.

I haven’t added any new features as I wanted to get caught up on some other tasks that I’d let languish wile going through this module, but I do have some plans to implement high scores.

If you want to play it in the browser, you can go here: http://server.ericsbinaryworld.com/WebGL/LaserDefenderWebGL/ (On Linux (at least for me in Fedora 30) only was able to hear the music when playing in Google Chrome. Firefox had sound effects. Vivaldi did not have any sounds)

If you want to download the game to play on your comptuer, you can go to the releases page of the github repo.

I’d like to leave you with a couple of videos from part of the game development process before we’d done all the debugging and therefore had some funny unintended consequences.