Skip to main content

UNITY TUTORIAL 08

"It Is Time To Do The Design" by Tenney Tang on Dribbble.

This week I finished the final set of tutorials for the arcade-style sumo battle game and completed a challenge. I learned how to spawn up to 3 enemies by adding a new void to the SpawnManager and using for-loop. I also learned how to make the number of enemies increase with waves using the (++) operator as well as getting the power-up to respawn in a random spot at the start of each wave. 

Screenshot of my work in Unity3D.

In challenge 4, I had to correct the scripts of a soccer themed game by applying what I learned from the sumo battle tutorials. I fixed the issue of the enemy flying towards the player instead of away when they collide by subtracting "transform.position" from "other.gameObject.transform.position" instead of the other way around. I replaced the "Powerup" tag under the enemyCount variable with "Enemy" so that a new wave begins when all the enemy balls are taken out instead of when the player collects a power-up. I also made the power-up's effects temporary. I made the number of enemies increase by 1 when a new wave begins using the (++) operator. I was a little unsure about how to get the enemy balls to move towards the goal but looked at the hints for some help then added a playerGoal variable.  

This challenge took some time to complete because the scripts have a lot of code and I had to scan it all to find the errors but the comments helped with this.

Screenshot of my work in Unity3D.

Comments

Popular posts from this blog

FIRST PLAYABLE

Continuing with the creation of my game, I resized the player character to make them even smaller based on a comment that was left on my last project blog. I also repositioned the trees to make the space slightly narrower and added some flowers to bring some colour into the scene. With reference from the animal feeding game tutorial, I was able to get the player moving left and right by clicking the arrow keys. I brought in rocks and a branch for obstacles but I need to apply a SpawnManager script and get them to spawn randomly during gameplay. I also have to figure out how to get some branches falling from the trees and bringing in power-ups and points too. Screenshot from Unity3D of my game production.

PROTOTYPE

I browsed through the Unity asset store to find a package with nature objects that I could use to set up the scene for my infinite runner game. I downloaded the Nature Starter Kit 2  and started building my scene in Unity. This was a little time consuming but I'm satisfied with the way it turned out. I upscaled the trees and bushes, keeping in my mind my initial idea of gaining inspiration from the movie "The Secret World of Arrietty." I got the character from a tutorial I have completed for this module before and positioned the camera behind it. Screenshot of my work in Unity3D. With reference to the lesson 3 Unity tutorial, I started coding by creating the PlayerController script. I used the AddForce method and allowed the player to jump by clicking the spacebar. I declared two public variables to be able to adjust the gravity and player's jump force. Looking into the player's animator controller, I applied a static running animation. I then added a jumping ani...

UNITY TUTORIAL 07

Illustration by Saikat Kumar on Dribbble . This week I completed the first three tutorials for building an arcade-style sumo battle game. In the first set of tutorials, I imported the necessary assets and brought a sphere into the scene then applied a texture to the sphere. I learned how to give the main camera a focal point so that it can smoothly rotate around the play area. Following this, I learned how to make the ball roll towards the camera no matter what direction it is facing.  I brought another sphere into the scene to act as an enemy in the second set of tutorials. I was introduced to physics materials where I was able to give the enemy the ability to bounce the player away. I made a new script and added code that allowed the enemy to follow the player. I also created a SpawnManager script for the enemy and applied the code which would cause the enemy to spawn in a random area at the start of the game. In the third set of tutorials, I brought in a star power-up and used ...