My Portfolio

Friday, September 17, 2021

September 17th , 2021 - My One-button Game

This is my first 2D project. You can download and play my one-button game here : https://stevie57.itch.io/test

One of my classes that I'm helping in as a teacher assistant is Rapid Prototyping. Over the last week students in this class needed to create a working game revolving around the concept of one-button input only. I figured I could participate as well through creating my own one-button game which I have now completed.

==

My concept was a reaction/timing focused game where you need to catch the correct fruit using spacebar as the only input button. The correct fruit is randomly selected by the customer.


Here were some of my key personal goals for the one week project:

  • Playable build
  • Utilize Unity's new input system
  • Scene Manager using Unity Scene Assets/Scriptable objects
  • Implement Factory method for fruit creation
Playable build / Scope Management

I wanted to take an iterative approach where I would make a build as early as possible with extremely basic gameplay and then slowly add features and functionality in new builds. The goal here was to ensure that there was always a playable build that I could submit at any point even if it doesn't fully realize the project vision yet.

Version 1 - Prototype

I'm pretty happy with this approach and it worked well for this project. One immediate benefit was that it allowed me to identify and fix an error really early on with my scripts that was preventing me from building a playable game. The issue was with an editor script. The game plays and works perfectly fine while in Editor but fails when you try to build it. Trying to create an earlier playable build allowed me to troubleshoot this without the pressure of needing to submit it during the last day.


Utilize Unity's new input system
So far I really like Unity's new input system. However, I feel like there is still a lot to learn when it comes to using this and will need to continue to experiment with the input callbacks. 

Scene Manager and using Unity Scene Assets
I feel that my previous projects did not handle scene loading and managing very well at all. It has previously always turned into a mess with the different scenes that need to be loaded/unloaded. I tried creating my own solution but there was aspects of it that were beyond my ability to program at the moment.

Luckily, I found some online references to Ryan Hipple scene manager demonstration which I've been using since.

Implement Factory method/pattern for fruit creation
It was much easier implementing the factory pattern then I thought. However, I don't really see how using factor pattern process for fruit creation is better than instantiating Gameobjects using prefabs. Regardless, I'm happy I was able to implement a working solution of the factory design pattern.

Conclusion
Happy with my project and personally think its pretty amusing to watch someone play it as its pretty hard.

For Art, I ended up purchasing Aesprite to make drawing pixel style faster. It's been a pretty easy and fun to use tool.

I can probably also use scriptable objects more instead of assigning/injecting dependencies.

From a programming difficulty perspective it hasn't been too hard. I've been able to implement the designs and use my previous experience to quickly build this prototype.

However, the project is heavily dependent on events to communicate between systems. Towards the end this did become a bit of a mess and I'm going to try and better manage the complexity through better re-naming in the future.

No comments:

Post a Comment