60 days to become a game developer. Day 18.

Mar McRae
3 min readNov 7, 2020

--

Hello and Happy Aloha Friday :-). Today is day 18 of my 60 day challenge to become a Unity Game Developer!

I got a lot done today and am very happy to have ended the week strong ( 🙌 ). Wanna know the trick? ASK FOR HELP! With that said, big shout out to my tech lead. He helped me figure out in an hour issues I’ve been having all week. I know I know, I shouldn’t have waited so long. Lesson learned. Also, contrary to my worries that asking for help would keep me from learning to debug on my own, thanks to his insight, I was able to work through most of the other bugs I had by myself. Hooray for progress!

Check out where my game is at:

Some things I worked on today:

  • Got the boss to work! Turns out I haven’t been using Coroutines correctly some of the time. I’ve been nesting the IEnumerator within functions, which worked for some of the other things I’ve done, but this was not one of those times. Because the method it was nested in was being called from within the Update() it was causing the position to move every frame(~50- 60fps). By simply moving the IEnumerator() out of the function and adding in an if statement to check for a newly created bool that gets switched from true to false after each iteration, I was finally able to achieve the behavior I was looking for, which was to have the boss transport to random points towards the top of the screen. I also updated its wave sequence in the spawn manager as well as its behavior. It now needs to be hit 15 times before it is destroyed.
Vector3.Lerp() is what is creating the illusion of transportation to different points on the x & y axis.
  • Finally got the Spawn Manager to work! Turns out I just didn’t have a couple of things in the right place 🙃. The biggest issue was that my _stopSpawning = true was happening at the end so there was nothing switching it back to false which is why the the while loop would stop executing after the first round of enemies.
  • Updated the enemy shield behavior. It’s finally working!

Some Challenges I faced:

  • Need to fix the way the powerups are spawning. Earlier I ended up with an infinite loop. Those are always fun. Luckily that has been taken care of but I need to redistribute it so that some powerups spawn more often than others. I also need to fix a feature that has the enemies destroy the powerups. They’re a little too good at it, so good that the powerups almost never reach my player. Will try to come up with a solution to that tomorrow.

See you then.

--

--

No responses yet