The beam attack in Aetherial
|
The beam attack actually wasn’t in the original design document of Aetherial, which was made by the group “Team Vampire”. However after looking at the players abilities we came to the conclusion that the player needed another ability, besides the harpoon, to deal with enemies who got behind him. Also we felt that the theme of being a “champion” wasn’t sufficiently represented by a ship that could only fire a harpoon; we wanted the player to feel powerful and in charge of a mighty weapon. In the design of the beam we wanted to make it the players main damage dealing attack, while we moved the harpoon into more of a utility role. The beam was designed to deal with the many fast moving enemies the game has, but also to deal damage to the boss after the player crippled it with the harpoon. It was mostly intended to be a weapon against many small enemies, so we made it reach across the entire screen no matter where you position your character. Something I will be looking forward to see as a result of the play testing during the alpha is whether or not the beam is too effective when dealing with the swarming enemies. In that case we might make it slower to maneuver when firing. This would make it less effective against many small enemies.
From a technical point of view we wanted the beam to be a straight line pointing towards the mouse courser, which dealt damage to every enemy it touched. To achieve this in unity I used a Line Renderer to draw the ray and a Boxcollider2D to handle the collision. The collider was initiated and controlled by a script which made sure the collider was always on top of the rendered beam. On collision it checked if the other collider belonged to a game object with the tag “Enemy” and if so it called the takeDamage function in it’s health script. One of the problems with this approach was that the damage was dealt every tick for as long as the enemy was in the beam, however I fixed that by adding a small invincibility timer to the takeDamage function. This also prevented a lot of annoying interactions when designing the enemy attacks against the player. |
