Unity Tutorial 07

 So for this week's Unity tutorial, I made a new prototype. So far in this new game I made, there are 2 balls on a platform, one you control and one that is controlled by an AI and they are the enemy. The aim of the game is to try and knock the enemy off the platform.

So what exactly did I do? Well first of all I made the camera focus on the platform so when I use the left and right arrow keys to move the camera, it is always focused on the platform and never anywhere else. I then inserted a ball and applied a texture to it and that was going to be the ball I controlled for the duration of the game. I did some coding to let me control the character with the up and down keys. Now you may be wondering how can the player turn? Well, I did some additional coding in c# to make the character go forward and back wherever the camera faces and not in a fixed position. 

I then added an enemy and applied a texture to that enemy also. I coded the enemy to do two different things and they were to follow the character wherever the character goes and also when I start the game to spawn at random locations on the platform so when you start the game you never know what position the character will come from. I then added a powerup that makes the player stronger and can send the enemy flying off the platform. But unfortunately, we can not have that powerup forever so I inserted a timer in the code to make the powerup last 7 seconds. And lastly, I added a powerup indicator to show when the character has the powerup and when it gets removed from them.

So after this week's tutorials, I can say I really enjoyed doing them as the game looks very entertaining and I learned a lot of new things. Two new things I learned that I love the most was the powerup and the powerup indicator because in most games you play today there are powerups and indicators to show you have powerups so learning how they are made in games was very fun.



Comments

Popular Posts