Day 7- I have what looks like a game!
Aloha and welcome to day 7 of my game building and code learning journey. Today I finally made what I feel like was good progress. I completed 2 full sections in the 2D programing course and overcame my challenge of creating and activating a coroutine. My game is starting to come to life!
After giving life to the enemy in the game, and allowing it to spawn or create a new one every few seconds I got to start adding in some of the details that make the game look awesome. Today this was one of the most rewarding parts as you get to see how all the hard work put into this is paying off. IN order to create this look we had to do some conversion for our game since we designed it in 3D. For starters we added a background and and created a background and Foreground layer. This is done because 2D games work in layers and you have to designate which layer you want the GameObjects to appear on. After that we gave our white player cube an awesome looking spaceship and converted it to 2D. The easiest way to do this was actually to add the 2D Sprite to our Hierarchy and then give it the player script and laser behavior scripts. Then we did a slight adjustment to our collision code and added the 2D element since the code was written for 3D. This was repeated for the Enemy and the laser GameObjects as seen below in our game with a fresh look!
The more of this program I get through the more confidence I have in writting the code and understanding how to write it. Most of it is very logical and requires asking the questions we asked as kids. Someone tells you if you throw a ball into the air, it will fall to the ground. And you ask why will it fall to the ground? What is the ground? What is the ball? and furthermore how does that work. So you have to tell them the ball falls because of Gravity and the ground is what you are standing on. I am starting to get even more excited because now I am learning how to grab information from other scripts and how to reference information from other parts of the game I was not abke to before. Cheers to another awesome day at GameDevHQ!!!!