top of page
Homebound GGJ - Trailer

Homebound GGJ - Trailer

Top of Page
Description Beginning

Homebound - Global Game Jam 2019

Role: Programmer
Software: Unreal Engine
HomeboundSplash.png
Click for Process Book
Introduction
Introduction

In January 2019, I had the honor and privilege to work with an amazing team on this Global Game Jam project. For this project, I decided to step outside of my comfort zone and become the lead programmer on this assignment, leaving all of the art content to my talented team members. One of the more challenging aspects I was responsible for programming was creating follow mechanics and AI of the human using Blueprint scripting. For that script, and others, I had to implement a series of code blocks and send scripting messages across different objects in order for the human character's input to be controller by the player. Another challenge that I ran into was getting the rope mechanic working and interacting properly when the user interacts with it. Both scripts are on display in the trailer video that was released for this game. It was a great project to be a part of.


The piece served as a purely technical Unreal Engine 4 project, as such I refrained from 3D modeling any assets. The main goal was making sure the game was functional, and that all game mechanics worked as expected. In a deconstruction, one would find that this piece is composed of three core functionalities. They are as follows:


• Player Follow System
• Rope Snap System
• Rope Pull System

2D Movement
Scripting 2D Movement in UE4

As I was charged with developing the core systems for the game, my first hurdle to overcome was getting 2D characters to work within Unreal Engine. Now Unreal Engine is a robust game engine that is known for creating the cutting edge 3D graphics featured in many AAA games. What it is not known for, is it’s 2D capabilities. As such, many of the documentation and help community resources that I’d come to rely on when scripting systems was arguably limited. Thankfully after a bit of research I was able to find Unreal Engine’s documentation on their 2D flipbook system. I’d utilize this documentation extensively for the duration of this project.

 

The first step in creating this game was to get the character working inside of the engine. As alluded to above, this was done using the Flipbook system in Unreal Engine. The process was relatively straightforward, and consistent with how 2D characters are created in other engines. Once I received the sprite sheet from the character illustrator, those sheets were imported into the engine. From there, I used the sprite cutter tool inside of Unreal to splice the images into sections.


Flipbook’s timeline was used to set the rate of each
animation. Images of this process, and the final result
in-engine featured.

Flipbook Scripting UE4

Once the base Flipbook was created for each character, I imported them into a base playground scene (featured to the left). This scene is where all systems testing took place.
With the two characters imported, the next step in this Jam process was in implementing the character movement system.

Player Movement

As there are two characters in this game, there needed to be two unique systems of movement for each character. To start this process, I got began working on the base run/walk movement of the dog character. Getting the character to move to the right was simple, as I was able to reuse code from UE4’s flipbook blueprint. The trick came when getting the character to move to the
left.

 

Given the original animation has the character facing the left, there needed to be a way to flip the animation when moving in different directions. Additionally the need to save animation states was a must, as each character has several different animation choices. To solve this, a script was first created to flip the character’s animation when changing directions. Once the movement script was handled, several event functions were created the store the different animation states of the player. This all culminated in a fairly robust and modular system capable of animating and moving multiple character actions.

Human AI Movement

With the player movement successfully created, I worked on tackling the script of the human AI. The script was rather multifaceted, and required several different layers in order to get it working. The good thing was many of the same programming methods utilized in the player movement script could be reused here.

 

When the game first starts, we wanted the AI to continuously move to the right. It’s only when the dog calls the Human character over, that the character stops the continuous movement and follows the player. As such, we step up the script to tackle just that. The image featured on top purely handles setting up the initial run script. Whereas the middle image shows the function required to get the AI to follow the dog.


Since the two characters are co-dependent on each other, an interface node was created to tie the two movement scripts together. This way, when the dog player barks, the human AI knows to go to the dog’s current position.