Genre:
2D Puzzle
Role: Coder
Platform:
PC
Engine: Godot
Time: 6 days
Team:
6 members
For this game I helped develop the systems and mechanics. I specifically worked solely on the timer system, UI, and pixel art. We had 3 coders and decided I would work on the Main UI and the timer collapse for the levels. For us three coders this was our introduction to godot 4. It was a new engine for us and we all learned many things. Especially how light weight the engine is and its tools for 2D games like built in path finding algorithms and built in camera settings both specifically made for 2D movement.
The development time took us a week, we spent the first day talking about concepts for the theme which was “Make me laugh”. After this we divided the tasks and got to work. My focus was coding the time and buttons for the main screen and helping some new members in pixel art and extra work.
This isn't a very in-depth game and we wanted to have a lot of fun. Many ideas were just something nonsensical to make the player laugh. Things like a clown tickling sheep and other clowns and having to throw pies at the IRS were just fun ideas to throw at the board.
This is the timer GD (godot) script. We used this as a clock to synchronize some of the game mechanics. In this case it was used as the countdown timer for ending the game. This was my first time coding in the GD script language.
One thing I found interesting is the line “label.text = "%02d:%02d" % time_left_counter()”. This line I used for updating the time to a label so it can be formatted and printed to the screen. What I like is that string formatting like this is used for printing which is something I've seen more in java coding. It's something i'm not used to using since I usually code in c# but I found it very interesting.
extends Node
@onready var label = $Label #Reference to the label node
@onready var timer = $Timer #Reference to timer node
@export var spawner : Node
var time_left
var minute
var second
func _ready():
timer.start()
func time_left_counter():
time_left = timer.time_left
minute = floor(time_left / 60)
second = int(time_left) % 60
return [minute, second]
func ResetTimer():
timer.stop()
timer.start()
func _process(delta):
label.text = "%02d:%02d" % time_left_counter()
# Any code below this is what triggers when time hits 0:00
if second == 0 and minute == 0:
spawner.GameOver()
func _on_timer_timeout():
pass # Replace with function body.