https://lwmmg.itch.io/space-invaders

The second game I was tasked with creating was a space invaders type game in which the enemies run towards the player and the player must shoot them as if they reach the grey box at the bottom then the player loses, the aim of the game is to survive as long as possible and the player has 5 lives, each enemy that reaches the end takes away one life.
The basic concept for this game was based on a hamster in a lab fighting off rats, this concept came about with inspiration from the “Wrecking Ball” character from the game “Overwatch” I did this because I found the idea of a hamster in a ball equipped with guns funny, this idea was fun to implement and I believe it was a fun twist of the genre.
I created the assets for both the player and enemies, whereas all of the other assets were just created in unity using the basic shapes provided and the text feature to display health.
This game was a step up in complexity compared to the cookie clicker but with help from the tutorial videos I managed to create the game with little trouble, it was difficult at times as I did not understand some of the coding at the beginning but I started to understand thanks to the videos.
The space invaders game has the basic things such as the character shooting and moving across the bottom of the screen and the enemies walking towards the player, i added health to the game so that it is not too difficult and when the player loses all 5 health it loads a game over screen with the option to retry.
The coding for this game was much more complex but was not overly difficult to do, it consists of the player character moving by accessing the feature of unity that has keys for horizontal movement, this made the coding easier than using the code to get a single keybind for each direction.
The shooting was done by instantiating a version of the bullet prefab and making it move on the y axis and then when it hit an enemy it would destroy both the bullet and the enemy, however if the bullet does not hit an enemy then it gets destroyed after reaching a chosen distance, this is done so that the game does not create too many objects and cause lag.
The enemies were done in a similar way to the bullets, it creates an instance of the enemy prefab within the assigned limits that moves towards the player and when it comes in contact with a bullet it gets destroyed and when it comes in contact with the grey box at the bottom it destroys the enemy and removes 1 from the value of the health.
The game over and replay script used the unity scene manager and loaded the other scene to switch between them.
