Day 4: I Stand Corrected…

Yesterday was not a blocker. It was a door that just needed to be pushed through with some effort. At least not compared to the problem solving I’ve had to utilize to get through some of the learning issues I’ve faced today.

I’ll start with a picture because it made me laugh at myself.

The goal was to spawn enemies with an infinite loop that had a yield return of 5 seconds. I did make that loop. The code was flawless. So what did I do wrong?

My “StartCoroutine(SpawnRoutine());” I had placed under the void update section instead of the void start section. I didn’t think it would make a difference since I was able to close off the while/infinite loop. But I believe now, especially after experiencing it, that it makes a HUGE difference. For “void start” happens once (in an infinite loop), whereas “void update” is a continuous (by frame I believe, could be wrong about it…I’m still 4 days in), so though my loop was closed properly, it was being run continuously (which basically nullified my coding).

Thankfully by reading more, listening to Jon on the tutorial, and going over my coding, I recognized my mistake.

The next challenge that I will tackle later tonight, was my next blocker that really got my head wrapped.

This was basically that I had made a container to hold all my enemy spawns (which is all the red boxes — will be space ships soon), so as not to crowd my “hierarchy” section in Unity (for organizing and debugging issues I believe).

So after I had gotten my “Enemy” red cubes to spawn correctly (not the ridiculous wall above lol). I began making the container and working on the coding needed so that I would be able to grab the new container and use it in the scripting of Spawn_Manager.

I finished the coding, made sure I had no errors, hit play, and then my red cubes disappeared. It was like David Copperfield showed up in my coding and made them disappear. But, like any good magic show, not did he make my enemies disappear, but he still caused damage to my Player, so that it would die after being it 3 times (I would have stood up and clapped saying, “Great trick, now give me back my spawns!”, but I made a promise not to talk to myself so much).

Even with my set back, I can still see myself growing because I really want to make this a part of my life and skillset. It’s like we talked about in our meeting earlier today. This is a great opportunity for us to learn a new skill that we want to pursue, that we wouldn’t of normally have, except for these difficult circumstances that we have fallen under (allowing us to not just learn a worthwhile skill, but to even be able to get paid while learning something that normally would have cost us a lot of money).

So for myself, I gotta put my all into this in the hopes of a better future.

Learning a new skill to be able to become a gaming software developer.