Unity Tutorial 03

(image of my game in unity, screenshot from my pc)



 This week in our Unity Tutorials we started a new tutorial to build and create a top-down view game with the objective of throwing food to hungry animals who are running your way. It is a different style to the previous game we created and I have enjoyed learning and creating from lesson 2.1 to 2.3.

In the first lesson we created our new Prototype 2 project and we went over player positioning. I added the player, 3 animals and a slice of pizza to feed them (although I don't know how much these wild animals like pizza 🍕). Then I made the player move left and right using the arrow keys and also added a boundary so that the player doesn't leave the scene.

In the second lesson I learned and created a function for the pizza to be launched as a projectile from the player. To do this I first made a script that can move the pizza forward at a fast speed. I then created it into a prefab so that later on it can keep making copies of itself from prefabs and not the original pizza which could later break the game (oops). I then wrote up the code to make the pizza launch from the player whenever the spacebar is pressed on the keyboard. Then I did a similar thing to the animals where they move towards the player at different speeds depending on the animal. I then set the pizza and animals to destroy when they leave a certain boundary.

In the third lesson I created a spawn manager that would randomly generate animals on the scene. To do that I had to create an array with the 3 animals and then randomize it in my scripts to make them appear at different locations and also random animals. I then also changed my camera perspective to Orthographic to get a top-down view on the game.

Overall I found these tutorials to be easy enough and I enjoyed learning some new things. I definitely look forward to finishing this game project and see the final outcome I create!

Comments

Popular posts from this blog

Introduction to a future [Please Enter Career]

Game Idea Research

Prototype