The second Game project at Futuregames. I did all the shooting, projectile behaviour, base entity behaviour and enemy behaviour scripts.
Team Size: 16
Engine: Unity
Time: 4 weeks
|
|
|
In Vanguard, you take control of the spaceship Daggerblade as you defend your home, a massive space colony, from invading threats.
To do this you must manage your ships energy across three systems: Engines, Shields and Weapons. Using these you destroy invaders and use their scraps to upgrade your ship against the upcoming waves.
For this project I really wanted to see what I could do with inheritance. At the bottom I have a Destructible, which is a base class that handles taking incoming damage and dying. Then on top of that I have a projectile and enemy class that inherit from the destructible class. Those then in turn have variants that inherit from them, like a projectile that homes in on the player or one that explodes when it hits something. The same being done for different enemy behaviours.
For this game the idea was that the player should only focus on managing energy and controlling the ship and so the player should shoot automatically. The way I went about doing this is a large spherical trigger around our player that logs the entry of enemy objects within it and begins firing on the closest one to the player.
Projectiles are all created by other scripts calling the shoot function in the ProjectileHandler singleton. Each call tells the handler which projectile it should create, where it should be created and where it should be aimed. After that the handler updates all live projectiles in the active scene, the base behaviour of those being to move in the initial direction of their target.
Enemy behaviour is determined by two scripts:
Destroyer script (named after the Ship class, should in retrospect be called something like EnemyShipBehaviour as it is used for all ship types, just with tweaked values), this holds acceleration speed, top speed, a multiplier to how much it prefers targeting the player instead of the space colony, Max hp, Max shields, how much metal it should drop on death, at what distance it should close in on its target and at what distance it should back away as well as the actual movement behaviour as well
EnemyShooting script, as implied by the name, determines how and what the enemy shoots. It has 5 tweakable values: At what range it will fire at the player, what projectile it will fire, how long the cooldown is between firing, how much more inclined it is to target the player instead of the space colony and lastly how often it should run the calculation to determine which it should target.
With these three enemy ship types were made. One that stays back and fires at you from afar, one that stays a little bit closer and still shoots and one that just beelines right to the player in an attempt to ram them.
Remember to not put too much on your plate. The scope of the game was larger than what was possible in those four weeks, I both gave myself and was given too much responsibility by others in an attempt to successfully deliver everything. In addition to the above points, I was also tasked with making a prototype for other features, example player movement. And while I managed to produce most of what was asked of me, I'm very doubtful I would have held out much longer without a decrease in my workload had the project continued on much longer.
Phone number: +46-73 073 85 80
Work Email: SimonMikaelAgren@gmail.com