Biscuit Basher

Biscuit Basher

Our first prototype project within Unity was to create a clone of ‘Cookie Clicker’. This project involved basic scripting and a simple game idea suitable for beginners of game development. I will be talking through my exploration of Unity, the challenges I faced, Unity’s strengths and weaknesses and additional research.

Exploration

I felt that I was easily able to follow the tutorials provided for us, which allowed us to create simple C# scripts. For this project I had an idea of what I wanted the game to look like before I had begun the tutorials. The theme would be very similar to ‘Cookie Clicker’, as I set out to gain a better understanding of how games were created in Unity. The exploration I had undertook was that I learned the basics of the Unity engine through tutorials. Learning about objects, scripts, components, elements, controls and the general user interface of the engine. I have previously had some experience with Unreal engine, and the layouts and controls are not too dissimilar. I had created all of the sprites myself using Adobe Photoshop, and imported them into Unity.

Biscuit Basher Interface

Challenges

The main challenge I encountered during this project was learning and understanding how the scripting works within Unity. Personally, I found the creation of the visual aspects to be simple to follow and create. On the other hand, the scripting was not as easy to follow. I made a few mistakes which made Unity show errors, which I was first confused about. On one occasion I had misspelled a word and I was expecting the code to work. However, the error code showed and did not allow the game to work correctly, since there was a spelling mistake. At first I panicked, because I thought I had done everything correctly, but then I took my time and looked through the code again and had found the spelling mistake. I understand that these will be the sort of teething problems associated with scripting.

Another challenge which I faced was playing a sound file through FMOD. It was my first time using FMOD and Unity and I challenged myself to manipulate the sound using FMOD, and then successfully triggering the sound in Unity. However, this did go exactly how I wanted it to. I had manipulated the sound I wanted in FMOD. The problem was that after I had transferred the sound into Unity, every time I ran the game a script error in the console would occur. This made me question what the error was, since I was under the impression I had carried out everything correctly. Alternatively, I decided to trigger the sound using an Audio Source, and then creating a script for the sound. This method showed no errors and I had sound in my game which was triggering correctly.

In terms of scripting I found it all very confusing at first. However, previously I have a small bit of experience in scripting with CSS and HTML, in which I learned about variables. So I had a small bit of understanding before scripting in C#, though I recognise they are not the same language. In this project the script I found most confusing was the script that controlled the auto upgrades. This script included quite a few variables, and a complicated if statement. An if statement will check for a certain condition in the game, and if this condition is true then the if statement will run the code for the game. However, if the statement is false then the game will carry on as normal for the player. In the case of this project, the if statement would check if the current price of an upgrade is greater than or equal to the current number of biscuits. If true then the script would update the price of the upgrade after the player has clicked on the upgrade. Whilst also increasing the price of the upgrades.

Auto Click Script

Unity Strengths and Weaknesses

I have learnt that using the Unity engine takes a lot of patience and understanding, simply because of the scripting process. To a beginner of the engine, I would compare learning scripting to learning another language. As there is a vast amount of information to learn, with someone new to scripting being very vulnerable to easy mistakes. For example, someone new to scripting could easily miss out a semicolon or spell a word incorrectly, which would then cause an error to occur in Unity. This could possibly develop some stress onto the user, as they may be unaware of how to correct the script.

On the other hand, Unity does allow the user to create anything they desire in the engine. There are no limitations with the engine. Although the user must understand what they want to create and then how to create it.

Additional Research

The additional research I carried out for this project was that I played the game ‘Cookie Clicker’ and explored its elements (Orteil, 2013). I took note of the upgrades and how they advanced the player through the game. Additionally, I looked at how much the prices multiplied with each upgrade. However, in my project I wanted to make the game slightly easier for the player, as this was a simple project and I was starting out with game development.

References

Orteil (2013) Cookie Clicker [Video game]. Available online: https://orteil.dashnet.org/cookieclicker/

Please click the link to play Biscuit Basher – https://nathan1230.itch.io/biscuit-basher