What a difference a day makes!

I had to take Monday off due to some long hours at my other job, but man oh man what a difference that brain break made for me today. The first few days of this course I have been completely overwhelmed and little by little it is all starting to make sense. I certainly have a long way to go and a few things like condensing the code to work on, but I also know that will come with practice.

For today I worked on 2 main things, Powerup Speed Boost, and Powerup Shields. I was so stoked when I was able to not only add the sprite to the game and all the appropriate 2D Rigid-body and Collision collider, but also do all the coding. I am really starting to love being able to call for game objects from other scripts and sources. I had actually done this the long way and it was working perfectly, and then after watching the challenge review I found out there was a shorter way to so it.

As you can see I have 2 of the 3 power ups in the screen. And then at that point I had a mind blank on how to animate it. But after a quick search I was back on track. What I discovered with having multiple power ups was how to write these in list form in C#. Instead of writing 3 individual “if” statements forcing a call to action I learned I can write these in a list form, like 1,2,3. Today was still great though, as I was able to create the new game objects, code them to act accordingly, make them a part of the “Spawn Manager” and give them some randomization. The final part I worked on today was the shields. This stumped me as I could not figure out how to write “do nothing” in C#. I wanted to say “if (the shields are active)- then don’t take lives” or essentially do nothing on impact. I tried several different approaches to this and finally had to seek the help of the video to figure it out. As per usual I was way overthinking it. But now I have this really cool looking shield I can use haha!

I am a self taught game developer and love pushing myself to learn new things.