Skip to content
From 2D Udemy Class I'm taking
ShaderLab C# HLSL
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Laser Defender

A Galaxian/Galaga clone from a Unity 2D Udemy Class I'm taking


Get binaries from this repo (click on "releases")

Play on the net via WebGL: (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)

A video of me playing version 1.0:

Also a couple funny videos:

I forgot to set the collider as a trigger:

Hilarious enemy shooting pattern:

Visual and Audio Credits

Sprites: Kenny Assets. Specifically these: - Available under Creative Commons 0 license (AKA Public Domain)

Sound FX: Kenny Assets. Specifically these: - Available under Creative Commons 0 license (AKA Public Domain)

Music: NES Shooter Mysic by SketchyLogic (here: - Available under Creative Commons 0 license (AKA Public Domain)

What I've Done Since Finishing this section of the class

N/A - stay tuned!

What I learned in this module of the class

  • Using input.getaxis and time.deltatime to be frame-rate independent. Otherwise, the faster your computer is, the faster the character will move. (Also allows for controllers to work)

  • Also learned a different way: ViewportToWorldPoint() to figure out where we are on the screen on a scale of 0 to 1 in both x and y directions. Compare with where we originall used Input.mousePosition.x / Screen.width * screenWidthInUnits (before I modified to add controller support)

  • Learned some ideas of how to figure out which features to work on next. Essentially, start with Player Movement and then choose after that based on what's necessary for the game

  • Learned about coroutines - A method that can yield its execution until conditions are met. Eg: when player gets to zero health, start the KillPlayer coroutine. The first Coroutine we used was in the FireContinuously() method where we set a delay between bullets fired out.

  • Learned to spawn enemy waves in a 2D game

  • Learned both how to use advanced particle effects for the explosions and for the starfields that give a parallax view

  • Learned about changing the render layer order to keep the laser from appearing on top of the player or enemy launching it.

You can’t perform that action at this time.