Engine Defender brings in some tower-defender elements to improve immersion and player retention. Building a turret in this game is a little different though.
It all begins with the Turret Resource Meter. There's quite a bit going on here. The four yellow buttons correspond to the four types of Turrets players can build. (Isn't my programmer art amazing!) The numbers on each button represent its turret's resource price while the number in the center depicts the player's current resource count. The outline of the center box shows the player's progress towards earning another piece of resource, while the orange fill inside the center box visually shows how much resource the player has compared to their resource capacity. Defeat enemies to fill the resource meter.
The Rocket Launcher will attack enemies on the ground. It has some cool upgrades, including one that causes the rockets to spawn several smaller heat seeking missiles.
See that yellow bar below the turret?
That visual UI element tells the player how much longer they have before the turret expires and turns off.
The anti-air crossbow targets flying enemies. In this screenshot, the player has activated the Flak mod which applies damage to all enemies near the intended target, including enemies on the ground.
Getting techy with it...
Engine Defender features many cool visual effects and particle systems. To improve performance and save motherboard resources, each enemy has the particle and other effects parented to them. When an enemy takes damage, the blood and other appropriate particles play once and then turn off. This is much better than instantiating particle systems only to destroy them after a second or two.
Turrets do not last forever.
In most games of this genre, the defense towers are chosen by the player before they start a level. Once the level begins, the player is stuck with their tower selection until the level ends. What if the defense towers ("turrets") do not last forever? What if the player had to constantly monitor their turrets and rebuild them throughout a level? And so the turrets of Engine Defender were born. Players need to first acquire the necessary resources before they can build a turret. "Those annoying enemies are carrying plenty of it, so blast them and loot their extra stuff." Each kill in Engine Defender gives the player some resources. Once a player has enough resources, they can exchange them to build a turret. Turrets last on average ten seconds and will execute their effects until their duration expires.
This mechanic adds another element of decision-making to Engine Defender.
"Which turret do I need, now?
Should I save up for the stronger turret in my kit, or buy a less powerful, less expensive turret now?"
The Bug Zapper boasts an advanced visual effect using Unity's line renderer and a custom script. I have to give credit to Digital Ruby for posting their free Lightning Effects to the Unity store. I took the liberty of re-writing their code verbatim before adding my own modifications. The modified code is responsible for linking the lightning between enemies and making the passive lightning arcs.
I used the same prefab to develop other cool lightning effects, as described in the Magic Spells section.
It took some experimenting and iterating to make the passive lightning arcs on the Bug Zapper rise along the three coils. Ultimately, I found that I needed the Inverse Transform Point to make the lightning appear to move properly.
Turret Mod menu. Unlock mods to improve the functionality, damage, or duration of the turret.