Day 12 with GameDevHQ

Eric Hankins
4 min readDec 17, 2020

“I get by with a little help from my friends” — Ringo Starr / The Beatles

Sometimes you come across moments where you think, “Hm, where did I go wrong?”. We get those moments occasionally in life; however, in coding you’ll have those moments constantly. I was determined to get my “galaxy shooter” playable build launched and ready to share. In my last blog, I mentioned how I was getting this massive error. This continued into today. At this point, I whispered to Unity “its not you, its me!”. I felt confident, the game wasn’t getting built because of some script error. I do get these yellow errors, that just simply don’t make sense. It mentions my damage variables are assigned but not used. Which isn’t true at all! I’m definitely using them. I choose to ignore them since my game is working perfectly.

Never be afraid to ask a friend. Once again, I come crawling back to a good buddy of mine to help guide me on this journey. I plead for him to shine some light on my situation. As a good friend always does, he came back with some answers. Apparently, I was not the only one to have this little problem. He directs me to our “all questions asked” board, and there it is, the answer! Within 10 little clicks, I was able to successfully build my Space Shooter game. I’m eager to share with all my friends and family, but there’s another issue. It seams when I submit my game over it doesn’t have the player within the file to open the game. So in order to play the game, I have to submit the entire “Windows Playable Build” folder. To do this, I had to download a zip program. Then zip the contents of the folder. Afterwards, our friends on the other end will need to “un-zip” the file in order to access the game. The game is now playable on their computer, wherever they’re at! Pretty cool, especially when I have family and friends back on the mainland, and within an instant I can share something I’ve (we’ve) created.

The problems continue! Even though the zip method is effective, it is not efficient! The file with the player is simply too large to quickly share as an attachment. On Slack it seems to work fine. Discord, email, and some other messaging services don’t have the large file capabilities to share. So I end up having to put the file on a cloud, and give them access to the cloud to access the file. Would be okay if the game was more complex; but for a simple game like this, I would like sharing to be a little easier and more direct. I will be reaching out our partners tomorrow on Slack to see if anyone else has the same problem. Or, even better, have the remedy!

After successfully sharing my game (well partially successful), I continued to the “extra’s” section. This was nice, simple and straight forward until the “enemy shooter” section. As a challenge for myself, I promised I wasn’t going to continue on until I got the lasers firing successfully. So I got to work at it. I started with creating a new “enemylaserPrefab” game object, along with a new script and assignment. I mimicked the script to the “laser” but changed the direction of the laser to be heading down. It took some time, but I was happy with the end result. Which was one laser, firing down, and damaging the player when hit. When I continued onto the next video, it seems there was a different approach. Jonathan walks us through creating a dual shot laser prefab attached to the enemy. Created a prefab for this and adjusted the “laser” script. So instead of my new script, we went into the original “laser” script and used If() else() statements to differential the direction of the laser’s behavior, depending on what game object the laser prefab is attached to (enemy or player). I did get quite confused on the next part of the video; we utilized arrays and get components to damage the player. Eventually, it all worked and I’m ready to submit my project. I’ll need a little advise on when and where to submit the project.

I took a quick peak into the “Phase 1” and “Phase 2” overview. I was quickly intimidated by what we were expected to accomplish. However, a part me of is excited for the challenge! I knew this was coming though, so I promised myself a long time ago that I would go through the C# survival guide. I imagine with a greater understanding of the C# script, I will navigate through the coursework with greater ease. So far, all these challenges were pretty difficult in the course. Even going through the coursework and creating another game from scratch is an option in my head. I’m sure it’ll go quicker than these past 2 and a half weeks have gone. Maybe even go through the new game and accomplish what I can from the coursework, when convenient. For example, creating different enemies, or different weapons and boosts. With a fresh clean script, I could have cleaner and more organized code. Just some thoughts on what my next steps are. Well, to the survival guide we Go!

--

--