Day 10 Phase 1 begins!
Today I met my goal of getting into Phase 1 of my certification.
I started my day getting down the last 2 segments remaining on my learning list. Building the game for windows and the web was the first thing to learn. Minor setting changes and learning, where your built game saves into was easy enough to learn.
Next just the little extra to help make your game feel like a real video game.
The explosion bug in the segment was humorous to me because I was thinking of that bug during the build of this project. I was banging my head trying to think of how I could fix the multiple explosion sounds. So, of course, it is an easy fix. Destroy the collider component once the explosion sound plays, so that when the explosion happens it doesn’t set off the sound again.
I had a difficult time setting up the enemy shooting back lasers at the player. I was trying to do it without peaking at the answer. I had the right idea in pseudo code but I was stuck with having the lasers change behavior pending on who fired it. So I gave in and checked the answer.
After I found out creating and testing the new behavior was easy.
Finally onto the Phase 1!
I managed to create 2 requested changes to my project before wrapping up the day.
The first change was enabling a thruster mode when you hold down the left shift key during gameplay. That was pretty easy to do and did not take long to create. Also adding the notes in my code so I get credit for the change.
The next part was a little tricky. Making the shield able to take 3 hits and changing color so that the player is aware that shield took damage.
I took to my college days and wrote out on paper the logic I was thinking to create this change in behavior for the shield.
After thought it was time to execute my thought into code. I managed to create the behavior for the 3 hits pretty easy. If and else if statements seemed to do the trick. The only issue I had with this is if later I wanted to have the shield take more hits or have a power up later that strengthens the shield I would need to change the code that suits a bigger amount of hits. For now I was satisfied enough to move on to the second part of the change, changing the color in game.
I took to the web and research how I do this. Then I found out that you call the Sprite Renderer and change the color in it. So this part took me a bit of trial and error. I couldn’t, at first, to get it to work.
After several hours of research and trial and error I finally got it to change! And more importantly change back! Now I am more excited than ever to get the rest of the list down and submit this project.