Postmortem: My Second Finished Unity Game
Originally published on my blog (blog.tarynmcmillan.com)
I finally finished The Ghastly Guesser a while back and posted it. I never did a postmortem for my first game, which I now regret. At the time I was just so relieved to be done that I didn’t spend the time writing down my thoughts. Now that The Ghastly Guesser is live I’m ready to reflect on the good and the bad in my project.
The Good:
I became a lot more comfortable reducing dependencies between scripts in this project. In my first game I spent too much time fetching variables from other classes when I could have just done a better job at organizing my method calls.
I used cached references at the top of each class more effectively too. So now I was able to fetch a component in the Start() method, store that variable, then use it again in another method in the same class. As a beginner, I used to keep fetching/redefining my variables over and over again without caching them-- a huge waste of time!
In this project I also became more comfortable reusing code. I now have several projects that I can pull code from and adapt it to serve my needs. For example, I was able to reuse the singleton pattern in my MusicPlayer class from another project I worked on in the summer.
This was my first time using input fields and I saw how useful they are. It took me a long time to figure out that I could make the string variable static and pass it to the next scene. I’d done something similar in a previous demo I’d worked on but I wasn’t used to working with a string inputted by the user.
The Bad:
I still can’t quite get the hang of sorting layers in Unity. In this game I worked with many different sprites and I wanted to have UI elements such as text boxes appear on top of them. This wasn’t easy to accomplish without fiddling around with extra canvas components. I had an explosion sprite ready to add to the ghost animation but I couldn’t get it to instantiate on top of the ghost sprite. Sorting layers is something I must work on!
I’m still working on being more comfortable with the get:set pattern in C#. I use Get() methods fairly often, but setting still gives me trouble. Hopefully I will get to work on that more in the RPG demo I am slowly building. The same goes for coroutines, which are a big part of working with C# in Unity. Although I use them more often now, I still think my code could be tightened up, especially when I attempt to nest the coroutines.
I'm still sometimes hardbaking values instead of using variables to set them. Ah yes, one of the most common mistakes any programmer makes in their code. I’m guilty of hardbaking values larger than 1 when I’m testing the code and then forgetting to go back and replace them with serialized variables.
Conclusion
I started The Ghastly Guesser thinking it would be a quick tutorial project that I could showcase on my portfolio. It ended up taking me a lot longer than I had planned to build, but I'm pretty happy with the results. I feel more confident each time I try to build a project myself instead of just following along with a tutorial. It's gratifying to see my imagination come to life via code and I can't wait to see what I come up with next.
Thanks for reading!
The Ghastly Guesser
A friendly ghost guesses the letters in your name. Spooky!
Status | Released |
Author | Mystic Mill Games |
Genre | Educational |
Tags | Cute, Halloween, Relaxing, Short, Spooky |
Leave a comment
Log in with itch.io to leave a comment.