2D Level Zone System 2D Level Zone System

2D Level Zone System

The 2D Level Zone System is a combined behavior and visualization tool that helps designers segment levels based on presumed screen aspect ratio.

Tool in use to recreate NES Metroid

The tool’s behavior aspect modifies the camera position and is heavily inspired by the style of Metroid for the NES. The tool’s visual aspects indicate the bounds of areas of the level that can be seen by the camera, as well as highlighting areas the camera will pause as the player approaches an edge of a zone. The tool comes with a zone transitions behavior that allows designers to customize transitions of the camera or player to the next zone.

Various components of the level zone system use Unity’s built in Bounds struct and a set of extension functions of those bounds.

public static class BoundsExtensions
{
/// <summary>
/// Gets bounds corners.
/// </summary>
/// <param name="bounds"> Bounds to get corners of. </param>
/// <returns> Corners in order:
/// xyz, Xyz, XYz, xYz, xyZ, XyZ, XYZ, xYZ. </returns>
public static Vector3[] GetCorners(this Bounds bounds)
{
float minX = bounds.min.x; float maxX = bounds.max.x;
float minY = bounds.min.y; float maxY = bounds.max.y;
float minZ = bounds.min.z; float maxZ = bounds.max.z;
return new[]
{
bounds.min,
new Vector3(maxX, minY, minZ),
new Vector3(maxX, maxY, minZ),
new Vector3(minX, maxY, minZ),
new Vector3(minX, minY, maxZ),
new Vector3(maxX, minY, maxZ),
bounds.max,
new Vector3(minX, maxY, maxZ)
};
}
}

Development on this tool began in November 2023 as a solution for recreating NES Metroid and wanting to unify all camera behavior into one system. In its earliest rendition, the tool only supported exactly what was required of NES Metroid, which included simple axis aligned movement and basic teleporting of the camera and player between rooms.

Demonstration of NES Metroid recreation at first milestone checkpoint

The tool then received improvements to be used on a larger project (in scope and scale), Goose Genie, a puzzle platformer developed by more than 80 students in 14 weeks as Spartasoft Studio. Receiving feedback for this tool from so many designers helped me compile a list of changes to upgrade the tool once more.

Tool was upgraded for use in Goose Genie

During the summer of 2024 (after carrying the tool into another work in progress game, Painter’s Lament), it became clear the tool was in a very workable state, but needed polish in the form of custom editors and quality of life upgrades. I spent 2 months upgrading the user interface for the tool and received positive feedback about the custom editors and quality of life functionality.

I was given an opportunity to bring this tool into Arizona Bones in the fall of 2024. Arizona Bones started as a non-violent metroidvania which fit my system perfectly. I worked with their team as their vision for the game shifted.

Tool used by Arizona Bones design team

Many bugs were fixed during the development process and the tool was iterated on in small ways to work better for the specific users engaging with it. One of the biggest changes so far has been adding debug visuals to indicate the visible area around a level zone. This helped the Arizona Bones team understand which areas they did or didn’t need to fill in with art. This feature is capable of dynamically adjusting its perimeter evaluation based on child zones. This lets designers organize their level zones in a parental hierarchy for easier editor navigation.


← Back to projects