Day 4 + Day 5: From 3D to 2D
It’s nearly the end of a long 4-day weekend. This is a blog for Friday, November 27 and Saturday, November 28 — with a collective total of 6 hours’ work for both days.
On Friday evening, I finished up the “Enemies” section with a code cleanup and moved on to the section entitled “Spawn Manager”. The main focus of this section was to learn how to implement Coroutines. A Coroutine is a section of code that controls a timed sequence. In this case, I needed to create a Coroutine that would direct a new enemy to spawn every 5 seconds, then cease to spawn new enemies once the Player died. You’ll see in the screenshot of my script “SpawnManager” that a Coroutine is enacted in void Start() — in this case, “SpawnRoutine”. Next you’ll see IEnumerator SpawnRoutine() and within the curly brackets below the coding to direct the enemies where to spawn on the grid and to wait 5 seconds between each spawn. Finishing off the script is the command telling the enemies not to spawn upon the Player’s death.
After completing the “Spawn Manager” section, I continued on to “Prototype to Production”. I downloaded the GameDevHQ Filebase for Unity which contains an array of different assets such as audio, materials, and sprites. I then converted my Player, Enemy, and Laser from 3D to 2D objects. See the updated characters below!
I’ve now moved on to the “Powerup — Triple Shot” section in which I am enabling the Player to shoot three lasers at a time instead of just one. I’m about a third of the way done with this section, and 42% done with the 2D course overall. I’m very excited to move forward in the upcoming work week and show more of my progress!