I need help on upgrades with my Cookie Clicker game "Chicken Clicker"

Hi guys! Two weeks back, after I finished making Owlet and the Biscuit Tower for the Brackeys Game Jam 2025.2, (You can check the game out here: Owlet and the Biscuit Tower by Joshington) I decided to continue keeping my scope small, and later on make a full-fledged platform game, so I decided to make a Cookie Clicker-esque project titled “Chicken Clicker”, where instead of clicking on a cookie, you click on a chicken. I made this game while following a 2-part tutorial on how to make a Cookie Clicker game in Godot 4 by Ice Bear Tutorials, and he was supposedly going to do a Part 3 on adding upgrades, whereas whether you click on the chicken a certain amount of times, you unlock some upgrades, and those upgrades will have the game automatically click the chicken for you every few seconds, but he never made a Part 3 recently, but…

Here’s my current progress here:

I’m not planning to release this project on itch.io, and this is just something I wanted to do for fun, and I originally wanted to make all of the assets by myself, but since I decided not to post the game on itch.io, I went ahead and got pre-made assets such as Rocky Roads Asset Pack (Here’s the link: Rocky Roads Asset Pack by Essssam), and the assets that Ice Bear Tutorials used to make the game (Here’s the link: Godot Cookie Clicker – Google Drive) but only the font and the sunburst png image.

So, I wanted to ask, how do you add clicker upgrades to a Cookie Clicker-esque game in Godot? Thanks for helping me/responding if you do! :chicken::computer_mouse:

1 Like

I don’t know Cookie Clicker, but I would just have a variable that gets incremented every time a click is made. Then every time that variable is updated, check to see if you’ve met a new threshold - and if so grant the upgrade. Theen for auto-clicking, you can increment the number by some amount every frame and it will act as if it had been clicked that many times without you having to pass each one individually.

var number_of_clicks: int = 0:
	set(value):
		number_of_clicks = value
		_check_for_upgrades()
var autoclicks: int = 0 #keeping mind that _process() runs 60 times a second, 1 is equal to 60 clicks a second.

var _process(_delta) -> void()
	number_of_clicks += autoclicks


func _check_for_upgrades()() -> void:
	if number_of_clicks >= 100000:
		#Grant ability
	elif number_of_clicks >= 10000:
		#Grant ability
	elif number_of_clicks >= 1000:
		#Grant ability
	elif number_of_clicks >= 100:
		#Grant ability
	elif number_of_clicks >= 10:
		#Grant ability

func _on_button_pressed() -> void:
	number_of_clicks += 1

Hi, good job on your game. i am not a good programmer, but i have made few clicker games so i think i could help. there are a lot of upgrades you can have but this is the core of them

You can just have a button for upgrade that on click just deduct the score and than add the upgrade if the score is enough

var score := 0
var finger_power_price := 10

#When upgrade button pressed
func _on_upgrade_pressed() -> void:
	if score >= finger_power_price:
		score -= finger_power_price
		amount_per_click += 1
		#You can add to the price for next time
		finger_power_price += 10

You can use Timer node to implement auto click. just connect the Timeout signal to your code and add score when timer is finished and start the timer again:

var auto_click_power := 5

func _on_timer_timeout() -> void:
	score += auto_click_power
	$Timer.start()

You can have different timers for different upgrades.
as i said these are really basic codes.
You can make a script for a button and use export var to just change the price for multiple upgrade that do the same like in cookie clicker where there is various income generator. I use this code but there is definitely a better way, but I am me.

extends Button

@onready var parent: Control = $"../.."
@export var price := 10
@export var wait_time := 1
@export var amount := 5

# Instead of adding a Timer node for each upgrade, I just add it from code.
var timer:Timer

# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	pressed.connect(_on_button_pressed)

func _on_button_pressed():
	# check if player have enough score
	if parent.score >= price:
		#if yes, deduct the price from player's score
		parent.score -= price
		
		# check if there is a timer
		if not timer:
			#if not so make one
			timer = Timer.new()
			#set the wait time
			timer.wait_time = wait_time
			#connect the timeout signal to _on_timer_timeout
			timer.timeout.connect(_on_timer_timeout)
			#add the timer as a child of button
			add_child(timer)
			#start the timer
			timer.start()
		else:
			#if there is a timer so simply upgrade the auto click
			amount += 1
			
		# add to the price
		price += 10
	else:
		# if player don't have enough score
		print("You Are Poor")


func _on_timer_timeout():
	parent.score += amount
	timer.start()

You can put the buttons on the VBoxContainer or something. hope this is what you’re looking for

1 Like