Skip to main content

UNITY TUTORIAL 03

Young person playing with computer from Freepik.

In this week's set of tutorials, I learned how to make a basic animal feeding game. The first section of tutorials took me through the steps of how to make the player move left and right using their arrow keys and how to prevent them from leaving the play area. I also learned that if-statements check for a condition within the game and if it is true, then whatever is inside the block of code will occur. 

The second section of tutorials introduced me to prefabs. I turned the GameObjects, in this case animals and slice of pizza, into prefabs so they were able to be easily duplicated. I learned how to make the animals and pizza disappear once they leave the scene. I also learned how to launch the slices of pizza from the player's location. I learned about else-if-statements. The block of code under this occurs when the condition checked by the if-statement is false.

The final few tutorials brought me though the steps of how to spawn animals by pressing a key. I learned how to randomise the spawn location by using an array which allows me to place multiple GameObjects into one variable. I also took a look at the difference between the perspective and orthographic camera projections. 

Personal screenshot of my work in Unity3D.


Comments

Popular posts from this blog

UNITY TUTORIAL 04

Various devices illustration from Freepik . This week I completed the final set of tutorials to create a simple animal feeding game. I learned how to make animals spawn on their own rather than having to click "S" to do so. This involved creating a custom function and moving the if-statement under "void Update" to this new function. I also learned how to make the animals spawn after a certain timeframe. I learned how to add box colliders to the animals and how to edit the size of these box colliders. Moreover, I was taught how to make the animals and pizza disappear when they came in contact with each other. I added an else-if-statement that triggers a "Game Over" message when an animal surpasses the player without being fed.  Following this, I completed a challenge in which I had to correct a game similar to the one in the previous tutorials. The final product should allow the player to spawn dogs to catch falling coloured balls. The dogs were initially a...

TECH TASK: CHEEZBURGER

 Meme created using the Cheezburger website. Image from Cheezburger site.