Unity Tutorial 05

 


For the tutorial tasked to us this week we had to learn how to create a repeating background so that our character isn't running along an empty plain. We achieved this by creating a script for the background that allowed it to repeat by fixing it's positioning and using a box collider to help indicate when it should repeat.


We also added a proper game over trigger which pops up in the bottom left corner of the screen when the player hits the hurdle. After that we returned to our script to move the background and hurdles left and made it so that after the player gets a game over, all things with the MoveLeft script stop moving. We applied the same command to the SpawnManager as to stop hurdles continuously spawning on each other when there is a game over. Finally we added the element from the third tutorials where objects will despawn once they reach a certain distance as to prevent lag and clutter. 


This tutorial I found rather tedious as it was more or less applying the same code to multiple scripts. While I know game design isn't fun and is basically just redoing the same text over and over for multiple thing, I thought for a tutorial on teaching us these things it could have been a bit more fun.

Comments

Popular Posts