Lynda.com: Become a Unity 2D Developer (Day 2)
Today's session was quite productive. I was able to implement code which allowed the player to move left and right. However, I took the initiative and made it so the player will be able to fly by pressing the up and down arrow keys. From there, in order to make the player move in a more intuitive manner, the character model will flip in order to face the direction in which the character is moving.
Once I completed the initial testing , I able to go back and make some additional tweaks. Now, there is a bit more friction and a bit of a bounce when the player lands. Lastly, in order to add a bit more realism, whenever the player is flying, the left and right propulsion is a bit slower than when walking on the ground. Also, now the player is able to diagonally. Originally, the player could only move using one key at a time. Now that the values for speed have been divided into speed and jetspeed, the player input responds to each of the keys regardless if they are pressed simultaneously or separately.
Naturally, the next evolutionary step is to divide the code into a more efficient manner. From here, I learned how to create a separate script for the controllers and then applied it accordingly. The stage of learning was definitely my favorite aspect of video games, the animations! Lessons prior to the blog, I studied the animation basics of 2D sprite animation for Unity. Without further delay, check out the new animations during movement. The astronaut is able to now walk and when flying, the jet pack ignites. Unfortunately, there were some unforeseen glitchiness on the second test run. Perhaps a reboot would clear the memory, for the sake of learning, I'm moving forward.
Lights, Camera, Action! Okay, so I'm not doing a Hollywood movie or anything, but the next step was to setup a camera. It was relatively simple, assuming I didn't run into any syntax errors. **Spoiler Alert** totes had errors. Below is the current example of the camera following the astronaut.
The last exercise I've completed today is dealing with creating a simple level with tile mapping. This process pretty simple. First, I selected the Tile Map option and then specified a texture for the background and foreground layers. From there, I organized each layer and applied 2D Box Collision to the appropriate assets.
Once I completed the initial testing , I able to go back and make some additional tweaks. Now, there is a bit more friction and a bit of a bounce when the player lands. Lastly, in order to add a bit more realism, whenever the player is flying, the left and right propulsion is a bit slower than when walking on the ground. Also, now the player is able to diagonally. Originally, the player could only move using one key at a time. Now that the values for speed have been divided into speed and jetspeed, the player input responds to each of the keys regardless if they are pressed simultaneously or separately.
Naturally, the next evolutionary step is to divide the code into a more efficient manner. From here, I learned how to create a separate script for the controllers and then applied it accordingly. The stage of learning was definitely my favorite aspect of video games, the animations! Lessons prior to the blog, I studied the animation basics of 2D sprite animation for Unity. Without further delay, check out the new animations during movement. The astronaut is able to now walk and when flying, the jet pack ignites. Unfortunately, there were some unforeseen glitchiness on the second test run. Perhaps a reboot would clear the memory, for the sake of learning, I'm moving forward.
Lights, Camera, Action! Okay, so I'm not doing a Hollywood movie or anything, but the next step was to setup a camera. It was relatively simple, assuming I didn't run into any syntax errors. **Spoiler Alert** totes had errors. Below is the current example of the camera following the astronaut.
The last exercise I've completed today is dealing with creating a simple level with tile mapping. This process pretty simple. First, I selected the Tile Map option and then specified a texture for the background and foreground layers. From there, I organized each layer and applied 2D Box Collision to the appropriate assets.






Comments
Post a Comment