Tiny Planet Defense Program (TPDP) is a small game I made for a Game Jam. My main goals were to get familiar with state trees (STs) by using them as much as possible, and to try to implement a narrative with stages/levels because I hadn’t done that in any other project yet.
In Unreal Engine STs are general purpose hierarchical state machines. They create a very flexible and functional multipurpose tool by combining selectors from behavior trees and state and transitions for state machines. Creating simple enemy NPC logic was very easy with STs. Each type of enemy had its own ST, but I was able to break down shared actions, like moving and rotating, into modular state tree task nodes. This allowed me to reuse most of the ST task blueprints across the various STs.
This game was inspired by the 1979 classic Asteroids. So I had to figure out how to wrap all objects around the screen when they go off screen. I handled this with a box trigger that teleports enemies to the other side of the screen with a small offset.


When it came to the narrative and dialog, I over scoped the project for the amount of time I had so I used AI to compensate. I wrote character sheets for a few characters and had GPT generate dialog and art. This gave me what I needed to implement the dialog system which ended up being a plugin I found on the Epic store. For more information on State Trees, check out this playlist here.



Leave a comment