Game design and prototyping: Cookie clicker

Full game

https://flicventure.itch.io/temple-clicker

To start off with I was quite nervous about coding, as I didn’t have much experience with it, so I decided to theme my cookie clicker on ancient Rome, a subject I know quite a lot about, due to studying it in my childhood.
I decided to make the game ‘Temple clicker’ where the player aims to upgrade their Temple and get more ‘faith’ in it.

I started off by deciding what upgrades to make, I considered what would make sense in the context of ancient Rome but also to a general viewer. It’s all well and good talking about things like ‘Votive objects’ or an augury but most people don’t know what that means, so I decided on three upgrades first a ‘Follower’, second a ‘Ritual’; specifically referencing the haruspex where the haruspex would sacrifice animals in a public spectacle and their entrails used to predict the future, and then a ‘God’.

To begin; the first script I made was the clicking script, to the right you can see the final script.
There are 3 variables:

Text; to display the number of clicks to the player.

Float, counterNumber; how many clicks there are

float, ammountPerClick; how much you get per click, this is set to 1.0

below the code “counter.text = counterNumber + ” faith”;” is displaying the number of clicks in a text box.

public void Click()
{

counterNumber += ammountPerClick;

}

is adding more to the total per click


Next is the upgrade, a main part of the cookie clicker, this is updating how much you get per click, this code you’d attach to appropriate upgrade(s).
The variables are allowing there to be clicking, showing the information for the upgrade, showing the current price, how much it increases, and the upgrade’s name.

The next bit of code, inside the public void PurchasedUpgrade is created so that every time you purchase the upgrade it increases how much you get per click. It’s effectively saying if the current amount of clicks you have is equal to or more than the current price then you can purchase the upgrade which will cause the price to be taken away from your current amount of clicks and the power of your click to increase, then the price and power to also go up for next time.
The code below is for the text displaying information on the upgrade, this makes it so that when the player is hovering their mouse over the text it will show the information on the upgrade.


For, the final upgrade I created an automatic increase, so that the clicks will increase over time.

The variables are there to point out that the auto clicks will not always be there and to say how much it’s increasing.

The next bit of code is telling the game that if the addingFaith variable is made not false to start adding clicks.
The second part of the code is making the clicks increase every second.



The final code is the purchasing of the final upgrade

it works effectively the same as purchasing the clicking upgrade.

overall I managed to make my Temple Clicker with little to no issues.



Posted

in

,

by

Tags:

Comments

Leave a Reply

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