Thursday 26 March 2020

Unity Tutorial 06


Unity Tutorial 06


In the first lesson of the Unity tutorial series we started to create basic game play for this project. The first step was to open the project and to change the background. For these side scrolling game types it is important to have scrolling/repeating backgrounds to give the best effect. Next we chose our character and refined the settings. Next we made a script in order to make the character jump by pressing space bar. We also tweaked the gravity and jump settings. We also added a spawn manager to make obstacles spawn at different intervals. 

After completing the repeat background the next step was to add some script to end the game. We done this by adding a colider to the character and the obstacles. When the game is over the game restarts by moving the player back.  A script to destroy the obstacles after they go through the scene is added also. 

In the next lesson we added more refinement to the game. We added a jump animation and a fall animation to make the jump look more smooth.  We also made the player start the game at running speed. 

Image Info:

Thursday 5 March 2020

Unity Tutorial 05


Unity Tutorial 05


In this weeks Unity tutorial we made more improvements to our animal defence game. The first thing that we did was instead of using the button S to spawn in animals, we now want the animals to spawn in automatically in timed intervals. We done this by rewriting some code and use the InvokeRepeat command.

Next we added the collider components to our animals. We need to set the box collider as a trigger for the animals and the projectiles so that we can make them both disapear when they collide with each other. By using the OnTriggerEnter command we will destroy the 2 game objects when they collide. 

Lastly we will edit our destroy if out of bounds script so that a Game Over messege will display if one of the animals makes it out of bounds. 

For the second tutorial I found it a bit more of a challenge. The aim of the tutorial was to use the same methods as the previous tutorial to complete the tasks but I found it alot harder because there was less help. i think that this was a good idea though because it makes us think for ourselves instead of copying the tutorial. 

Image info: screenshot from unity tutorial

Unity Tutorial 06