,

https://lwmmg.itch.io/cookie-click

The first game prototype that I made is a cookie clicker game, this game includes 8 upgrades, one of which increases the cookies per click while the others add cookies automatically.

While I played with some other ideas I could not think of a different concept that I thought I could do better than the basic cookie clicker so I created a basic cookie clicker game and used some upgrades I could think of that are similar but not the same as the original cookie clicker game.

The assets for this game were found online and I cropped them all and added them to the buttons, the button base was made in photoshop and added to the button in unity to create the button look with a bevel as opposed to the basic unity flat button.

The font I used I found on the website dafont and it is the “milky coffee” font by Khurasan, this font is a cartoon style font that I really like and I felt that it would fit the cookie clicker style.

The coding for this game was done by following the videos provided and is not changed much, however as I added more upgrades I started to change the code slightly, this taught me how to understand how things such as float values worked and it worked as a good introduction to unity and how the coding interacts with the game.

To go into further detail into the content of the code, it used a value called “ammountPerClick” which started at 1 and when you clicked the button that it would add one cookie to another float called “counterNumber” which tracked the total number of cookies that you have created, this number was displayed in an attached text box, the upgrade to improve the amount per click added 1 to the “amountPerClick” float and then increased the price of the upgrade by a given percentage. The automatic cookies upgrades were done with a coroutine that added the current number to the total cookies every second, this was done more smoothly by dividing the numbers added by 10 and then adding that number every 0.1 second so that at the higher numbers it looks like it is going up smoother than adding a large amount every second, for each automatic upgrade it included a cost of the upgrade and the number of cookies added every 0.1 second by the upgrade, this number is added to the current “cookiesPerSecond” number which then adds to the total cookies, after this value is increased the price of the upgrade increases in cost in a similar way to the first upgrade, all of the upgrades show in a text box underneath when the mouse hovers over it the name of the upgrade, the price and how many cookies it adds per second.

Leave a Reply

Your email address will not be published. Required fields are marked *