Timber Tycoon is a 2D top-down tree farming simulator, where the player can farm wood to upgrade there axes and get better equipment, and was created using Unity 2022.3.4f1 as part of a 'C# Scripting for Games Engines' module at Staffordshire University. This module ran from January - February 2024, taking a total of two months to complete. It took me through the planning, design and production phases of games development, giving me the opportunity to create my own project within the language/engine.
Design
Before development began for my game, I did some design work, figuring out how to approach the multiplier system within my game. In Timber Tycoon, axes, the tree your hitting, and the general yield value are taken into account when the player is harvesting wood within the game. Below is a diagram I created when devloping this system showcasing exactly how it works.
Programming
When developing Timber Tycoon, I wanted to ensure that the programming was well structured and modular - which I accomplished through using OOP practices. By outlining the data which will be passed around, I was able to create modular elements to most systems within the game.
Here is my harvesting system within the project. The harvesting controller communicates with the hitbox and axe handler to get hit data and hit information.
With this system defined, I was able to program it effectively. In my harvesting controller, when 'Fire1' (left click) is pressed, the 'InitialiseChop' function is ran. As shown below, it first checks for whether the current item is definitely present. If it is not, it gets the next item in the inventory. After, it accesses the inventory display (interface which accesses the 'PlayerAxeHandler' class) and tells it to use the slot. This begins the swing animation. Then, the hitboxes 'GetChoppable' function is ran to check whether any trees are within the hitboxes overlap. If a tree is present, it calls its 'Damage' function which applies the damage given (axe damage value).
JD Utility Unity
While creating this project, I decided to dedicate time to building start building up a porfolio of tools for building games. This was created as a personalised list of scripts that I find useful, including Audio Management, Save Management, Scene Management, and more. Most of this system is accessed using the Singleton design pattern.
Below are some pictures of the utility including some definitions to the different elements of the tool and what they are used for.