Thursday, February 20, 2020

Unity Tutorial 4

So for this Unity tutorial we took a look at a couple of different things, in the first tutorial (2.1) we looked at some basic movement functions as well as how to prohibit the player from moving to a certain area, such as the end of the map. This is done with something called an "if" factor, that for example tells the game to move a character to the right "if" they step too far to the left. I found this pretty cool since this kind of concept is used all the times in games, so learning about it was pretty interesting.

In tutorial (2.2) we looked at how to launch projectiles, in this case food, at animals. This is done by writing script that makes the object go forwards, by using prefabs we can make that motion occur whenever the player presses a certain button, in this case the spacebar, a pretty cool mechanic with plenty of uses. We also looked at how to create boundaries on the edge of the map, which deletes/removes any objects that go past them and leave the map.

In the final tutorial (2.3) we pretty much spawned animals by pressing a button and made them walk around. All of this was done with random values so the animals spawned randomly at different points in the map. This was done similarly to what we did in the previous tutorial. We also messed with the camera a bit and flipped between isometric view and perspective view. When complete the final version is pretty much space invaders but you have random animals trying to kill you, unique stuff.

Source Unity

No comments:

Post a Comment