game creeps

Tue Jun 10 2025

Lessons learned

Written by: Cesar

3 min read

godot

Today I will blog about my experience building a simple game in Godot. I went through the online tutorial and after completing it was immediatly hooked.

The game that was implemented is a top down game where you can move the main player around and the object of the game is to avoid the enemies from colliding with you for as long as posible. The longer you do this the higher your score. You can try the game by going here

I few things I learned:

How to strcture a game, various pieces of the game: Project, Player, Enemy, Game, HUD

Project, in this section we setup the size of the window, stretch, these are setting you will do for every game. We aslo are provided with some game assets (iamges used for the player, enemies, sounds, music).

Next we use scenes for the different components of the game (Player, Enemy, Game, and HUD)

In the game need to be able to display the player, and move it around the game to avoid the enemies for this functionality an Aread2D is used. There are many ways to implement a player but since we don’t need any physics or other engine behaviors I assume this was the reason for using this type of node, this node also requires a CollisionShape and a CollisionShape2D is used. This will allow us to detect when the player hits something in the game. A player also has a visible representation, and for that an AnimatedSprite2D is used, this node will allow as to add some animation to our player. We also need a way to move the player, for that Input.is_action_pressed() is used to determine in what direction to move the player. All this is done in the _procces() function on the node, which is called in the game loop.

position Signals

In this game we want to control a player by moving it and avoiding obstacles, the enemy

This is all done using various nodes/scenes

Addtions made to the original, as most users are on mobile devices, the original keys used to move the player around do not work on mobile devices, so I added a virtual joystick using the following module.

Game functionality: For this game we will need to show the player on the screen, move the player and animate that movement and detetect when we collide with an enemy. We also will need to increase our score as we avoid the enemy (score increses). We also need a way to spawn waves of enemies also with differnent anaimations We want to display to the user a score and play some music and some sound effects to make the game more engaging. When the player collides with an enemy we should kill the player and let the user restart the game.