Scrap and Battery

AI/Gameplay Programmer

Unreal Engine 5 - 8 Person Team - Roguelike Action - Jan 2023 to Apr 2023

Overview

In this roguelike action game, take control of a lowly worker robot who longs to escape from the confinement of their underground factory. Destroy the blockade of robots that block your path, use the scrap you collect to purchase powerful new weapons and abilities, and, above all else, make sure you don't run out of battery!

My main contributions to this project include: 

I joined the team developing this project, Forged by Fire, halfway through their development cycle to fill in for their previous AI programmer, sticking with them for the full release of the game. Said team entirely consisted of programmers, but the multidisciplinary needs of the project meant that every developer needed to wear multiple hats.

Play it for yourself on Steam!!! Scrap and Battery - Steam 

Play it for yourself through DigiPen Game Gallery!!! Scrap and Battery - DigiPen Game Gallery 

Old Enemy Types

In Scrap and Battery, your character possesses a battery pack that automatically drains over time. If you don't reach the end of the level before that happens, it's game over. The best way to give yourself more charge is to defeat the various enemy robots that also stand in your way, but be careful! Being damaged by these enemies causes you to drop your pack, switching your power supply over to a much smaller emergency power bank; picking a dropped battery back up is imperative!

The foundations of game's core three enemies are the product of the team's previous AI programmer, who had left the project before I had signed on. One of my core responsibilities on the project was figuring out where I could improve the behaviors and technical stability of these enemies. 

Melee Enemy

The basic Melee enemy type is the most common obstacle the player faces throughout the game. It chases the player and attempts to hit them with a punch if within range. Although not particularly threatening on its own, its presence can often act as a nuisance once combined with other specialized enemy types.

When I started working on it, the Melee enemy had fairly common inconsistencies with sensing the player and successfully attacking them with its strike. After resolving these issues, I ended up using this enemy type as the base to develop additional universal enemy behaviors upon. An example of these behaviors is the "starting patrol behavior". This allowed level designers to specify a sequence of movements for enemies to perform on spawn before returning to standard behavior.

Projectile Enemy

The Projectile enemy type, unlike its red counterpart, remains stationary. However, after a brief windup, it quickly launches a large metal ball that can damage the player. While this enemy can be a challenge to fight depending on how far away it is, its attacks can also be used to the player's advantage. The metal balls deal significant damage to other enemies, so leading other targets into the projectile's trajectory can quickly dispatch otherwise troublesome foes.

In updating this enemy type, I fixed several small bugs that had negatively affected gameplay. For example, the enemy’s projectiles would initially linger in the level after being fired and obstruct the player, so I gave the balls a maximum travel distance and corresponding self-destruction logic. Gameplay issues also frequently arose from the enemy’s lack of any long-range attack telegraphs. I worked with my team's VFX artist to design and implement an aiming beam effect that filled this absence. 

Defender Enemy

The Defender enemy poses a challenge for players due its passive effect: the ability to create impassable electric walls between other nearby Defenders. When used in large enough groups, entire damaging nets and fences can be created.

Out of the three basic enemy types, I spent the most amount of time working on features and fixes for the Defender. One such feature was an ambient patrolling behavior. Defenders could be given a specified patrol route to follow, allowing their wall obstacles to dynamically shift. This increased the potential for new and interesting level design opportunities.

I faced a large challenge in working on the Defender to resolve complicated issues involving the generation and removal of the electric barriers. In its initial state, barriers would often:

Trying to resolve these issues and simplify the system at large proved to be a challenge due to a lack of documentation. By methodically analyzing and testing the previous system's individual components, I was able to engineer a new system that achieved the effects I desired.

New Enemy Types

After completing the first set of stages, the player will slowly encounter a few new types of enemies to fight, each with their own unique means of keeping the player from the end of the level. In addition to these, the player might also encounter some super-sized miniboss versions of the numerous standard enemies they've faced up to this point, each having alterations to their normal abilities to make them extra tough to fight!

After signing onto the project, the team considered the best way that I could contribute to the game's development. One idea quickly put forth was adding additional varieties of enemies that could be used to make fresh new levels. Following some initial brainstorming, ideas were created for the thieving Gremlin, the defensive Barrier enemy, and the disruptive Pulse enemy. I was responsible for designing the specific functionality of these enemies and for implementing them with Blueprint scripts and UE5's built-in Behavior Trees.

Gremlin Enemy

For this enemy, the team was interested in a design that played around the game's central battery mechanic. We came up with an enemy that could steal one of the player's dropped batteries, and the "Gremlin" terminology stuck shortly thereafter. 

In standard idle gameplay, Gremlins act in a completely passive manner, wandering around their current area at random intervals. Once a battery was dropped, Gremlins would directly try to move towards it, placing it on their backs and out of the player's reach if it was successfully stolen. 

Iterations and additions to the Gremlin frequently modified what they would do after a battery was capable of being stolen. Initially, the Gremlin would merely stand in-place upon pickup, waiting for the player to approach and destroy them. Efforts to make the Gremlin somewhat of a greater threat caused this "stand-in-place" behavior to be changed. In its final version, the Gremlin generates an area-of-effect healing ability if standing nearby other normal enemies. If there isn't anybody to heal, the Gremlin tries to run away from the player. If a given encounter has multiple Gremlin enemies in it, Gremlins that aren't carrying a battery try to protect the carrying Gremlin by swarming around them.

Barrier Enemy

One of the designs I suggested within the initial brainstorming meeting was the Barrier enemy, which aims a directional shield towards the player to block projectiles. This idea was meant to be another iteration on the "enemy via obstruction" concept already explored through the basic "Defender" enemy type. To differentiate it further from the Defender, it was decided that the Barrier enemy's shield would also reflect incoming projectiles rather than just negate the damage from them. As such, this was used as a highly effective means to protect other enemies.

In order to strike a fair balance between being tricky to defeat and too obnoxious to deal with, two inherent limitations of the Barrier enemy's shield were baked into its design. We wanted to enable players of any ability loadout to be able to combat this enemy. Therefore, the Barrier enemy both stands in place and has a very limited rotational speed, meaning that careful positioning and quick damage output could lead to a rapid victory. Furthermore, by only being effective against directed projectile abilities, the enemy is highly susceptible to area-of-effect attacks and long-reaching melee attacks.

Pulse Enemy

The concept of the Pulse enemy, an agent that would periodically generate a momentary outward force in an outward radius, was another iteration on the "enemy via obstruction" concept. Not only could these pulses protect it from a player attacking at close range, but they could also meaningfully disrupt the player while tackling other challenges. By messing with the player's positioning, the pulses make it harder for the player to quickly clear combat encounters, avoid stage hazards, and retrieve dropped battery backs. For all of these reasons, this enemy type was reserved for encounter augmentation roles within the game's later levels. 

Minibosses

In addition to creating the three new basic types above, talks with one of my team's level designers revealed the need for a set of more difficult "miniboss"-style enemies that could be used to create compelling focal point encounters throughout the game. To achieve this, I designed "enhanced" versions of our existing enemy cast using the same Blueprint and Behavior Tree tools as before. This eliminated the need for boss-specific tutorials and allowed us to efficiently reuse available assets. After scaling up copies of each basic enemy to an imposing size, I modified these variants to utilize more extreme versions of their standard abilities, with a few gaining completely new abilities as well.

Due to time constraints that effectively limited the number of unique levels and encounters present in the game, not all of these Miniboss enemies were used in the final game's levels. 

Another development challenge relating to these enemies involved their health. When testing initial implementations, players often had difficulty defeating a given Miniboss before running out of time to do so. Initially, I added the ability for Minibosses to spawn more standard enemies, giving players a means to accrue more time. However, I later developed a more effective solution to the problem by reworking these variants' health resource. I added a feature for Miniboss health to be split up into a defined number of individual segments. Dealing a segment's worth of damage awarded the player more time, allowing them to directly focus on fighting the bosses without issue.

Old Type Minibosses

New Type Minibosses

UI Elements

In addition to creating the core behaviors and gameplay logic behind the project's enemies, I worked alongside my team's main UI designer/programmer to set up health bar UI elements for said enemies. This process also involved creating unique segmented health bar logic for Miniboss enemies, whose large sizes created the need for an additional context-dependent HUD element.

I also worked with the main UI designer/programmer to set up action indication bars underneath the standard health bars for the basic Melee, Ranged, and Pulse enemy types. These elements are intended to better signify the windup timing for these enemies' core abilities. An action bar was also set up for use by the Gremlin Miniboss, for its unique battery stealing attack also relies on a windup.