Rian Young

Game Developer

Blighthouse

Itch link

The main menu, as it didn
The main menu, as it didn't have an actual logo. The top reads "Blighthouse" with menu buttons reading "PLAY", "CREDITS", "SETTINGS", "QUIT", and "A message from the developer" respectively.

Submitted to Godot Wild Jam #72, developed between 9th August and 18th August 2024 with the theme "Light and Dark".

Placed #136 out of 155 entries.

Summary

Blighthouse was planned to be a free-roam tower defense game, but sadly our team way overscoped and ended up with a barely functioning mess. Still, it was a great learning experience for me.

Pathfinding and AI Behaviour

For the enemies, I learned how to use and implement Godot's NavigationAgent system, which uses the A* pathfinding algorithm. Additionally, I made a finite state machine, which I used for the enemy AI to control their behaviour.

The 2D game scene with the debug shapes enabled for the outer collision and valid pathfinding space
The 2D game scene with the debug shapes enabled for the outer collision and valid pathfinding space
The scene tree for the enemy entities.<br>The root is a CharacterBody2D, and it has (grand)children such as a state machine with its states, sound playing nodes, its sprite and animator, timers, navigation agent, and its components (more later).
The scene tree for the enemy entities.
The root is a CharacterBody2D, and it has (grand)children such as a state machine with its states, sound playing nodes, its sprite and animator, timers, navigation agent, and its components (more later).

Shader

For the lighting, I took my first leap into proper shader code using Godot's shader language. It was implemented as a modulator for the entire canvas, where every pixel was darkened unless a light was present nearby. Admittedly, it wasn't very good, and Godot's 2D lighting system would have worked better anyway, but it was fun to get into the nitty gritty of shader code.

Some fragment shader code for the lighting system.<br>A "light" is stored as a vec4 colour, where red and green is its x and y position in space, blue is its colour type (retrieved from a const array, 0 is red, 1 is orange, 2 is yellow, etc.), and alpha is the strength of the light or its radius.
Some fragment shader code for the lighting system.
A "light" is stored as a vec4 colour, where red and green is its x and y position in space, blue is its colour type (retrieved from a const array, 0 is red, 1 is orange, 2 is yellow, etc.), and alpha is the strength of the light or its radius.

Components

Blighthouse was my first experimentation in a component-based entity system. As a developer, I only had to code the functionality for health, hitboxes, and attacks once, then I could simply drag and drop the components to instantiate as needed to the necessary entity.

The scene tree for the player character.<br>The root node is a CharacterBody2D, with (grand)children such as its sprite, a light Marker2D, components, weapons, sound playing nodes, timers, and colliders/areas.
The scene tree for the player character.
The root node is a CharacterBody2D, with (grand)children such as its sprite, a light Marker2D, components, weapons, sound playing nodes, timers, and colliders/areas.
The GDScript code for the HealthComponent. Contains exported variables and a "damage" function.
The GDScript code for the HealthComponent. Contains exported variables and a "damage" function.
The inspector for HealthComponent.<br>Max Health = 20<br>Root Node = Player
The inspector for HealthComponent.
Max Health = 20
Root Node = Player

Retrospective

While Blighthouse could barely be classed as a game, I have no regrets in it being part of my learning journey. While some poor decisions were made, and the systems were fairly primitive, Blighthouse was an absolutely essential stepping stone into bigger and better things. The components paradigm and FSM are highly adaptable concepts that I use in my later projects.

Follow my journey

Get my latest thoughts, posts and project updates in your inbox. No spam, I promise.