Alien Defender is a tower defense game I've been developing as a visual effects and shader showcase. The goal is to prevent the aliens from reaching their space ship and escape when too many get aboard.
In addition to designing and programming the game itself, I created all of the models, shaders, and visual effects that you see in the game. I wanted to keep the usage of 3rd party assets to an absolute minimum.
Models
I created the models, textures, animations and rigs for every object you see in the game. I did this in Blender. I made sure to bake the textures of all of the models so they only use one material each and kept the polygon count to a minimum. This minimizes GPU impact and allows the game to have many instances of aliens and towers on screen at a time.


Canon tower model
Canon tower model
Lightning tower model
Lightning tower model
Alien ship model
Alien ship model
Alien model
Alien model
Shaders

I've created many shaders in Shader Graph for this project so far. You can click on each image below for an explanation of how they work. I love being creative with Shader Graph. Combining custom shaders with particle systems is where things get especially fun.
The Shader Graph for the Alien Ship Beam. Noise is generated, and used to determine the alpha of the material. The UVs of the noise are modified over time to that the beam appears to be moving upwards.
The Shader Graph for the Alien Ship Beam. Noise is generated, and used to determine the alpha of the material. The UVs of the noise are modified over time to that the beam appears to be moving upwards.
The Shader Graph for the Enemy Dissolve effect. With those one, I use a Voronoi Noise that is fed into the alpha value and animated on to give the alien the appearance of dissolving.
The Shader Graph for the Enemy Dissolve effect. With those one, I use a Voronoi Noise that is fed into the alpha value and animated on to give the alien the appearance of dissolving.
This Smoke shader is very versatile, because it's color is driven by UVs. This means, when I use this shader in a particle system, I can have each particle's color driven by the particle system. It's used for explosions, the spawn effect, as well as on the ground around the alien ship beam.
This Smoke shader is very versatile, because it's color is driven by UVs. This means, when I use this shader in a particle system, I can have each particle's color driven by the particle system. It's used for explosions, the spawn effect, as well as on the ground around the alien ship beam.
This Lightning shader is adapted from a video by Gabriel Aguiar, but I made it into my own. Two high contrast noise instances moving in different directions are combined together, and turned into an outline with the Rectangle node. This gives it an electric appearance. Then, a polar coordinates shader is used as a feather mask to give it smooth edges. This shader is used for the lightning tower electricity effect.
This Lightning shader is adapted from a video by Gabriel Aguiar, but I made it into my own. Two high contrast noise instances moving in different directions are combined together, and turned into an outline with the Rectangle node. This gives it an electric appearance. Then, a polar coordinates shader is used as a feather mask to give it smooth edges. This shader is used for the lightning tower electricity effect.
Visual Effects
Many of the effects, such as the explosions, the alien ship beam, and the enemy spawn, utilize custom shaders made in Shader Graph that are applied to meshes I made in Blender, which are then spawned and controlled with VFX Graph. However, VFX Graph is not currently compatible with WebGL, which is used to play Unity games in the browser. So, I re-created these effects in the standard Unity Particle System which does work in WebGL.
An alien spawn effect using the smoke shader I created earlier.
An alien spawn effect using the smoke shader I created earlier.
You can play Alien Defender in your browser in the embed below, or on Itch.io. The gameplay is still a work-in-progress.

You may also like

Back to Top