Project Description

Published On: January 17th, 20230 Comments

GAM 606, Rapid Game Development; Maze Game

This assignment was all about finding an interesting way to present the classic Maze genre. As I struggled with ways to make a unique spin given the constraints (top-down, 2D orthogonal camera), I settled on trying to create a minimalistic “vibes” game instead. The random maze generation code is built off of the tutorial at, which goes on in further detail on how to create rooms, doors, a minimap overlay and even optimization code for hiding rooms that are currently not being drawn on screen.

The idea behind the game’s presentation was to explain as little as possible to the player and have them figure out what to do through trial and error, whether it’s deciphering that the goal is to light all the fires in the maze in phase one or that you can change the player’s color to enable them to pass through the matching paintings on the walls. Ultimately, the pacing of the game just doesn’t quite work, with the first segment generally feeling like it drags and the second sometimes going too quickly. I also was pretty much experimenting with lighting in Unity for the first time here, so my grand vision of a lit/unlit maze that evolves as you go on didn’t really come off. All great learning experiences, though.

Programming Notes

  • ScriptableObject Events is here as always to handle game state changes and pickup tallying
  • The catlikecoding maze script stores each wall as a MazeCellEdge, with the Paintings as children of the wall they’re attached to. It also stores a wall’s opposite partner as otherCell, so we can use that to teleport the player from one side of the wall to the other (which is actually stored as two separate walls, or MazeCellEdge objects–one for each room, essentially).
  • The in-game “cutscenes” are all manually crafted/timed coroutines that raise/lower the main directional light’s intensity in steps to mimic a fade-in/out.
/* Painting teleportation snippet */

private PlayerColor orbColor; // current player color
private Player player;
private float hoverTime;

private void OnTriggerStay(Collider other)
	// check that we're dealing with player and that they're the right color
	if (!other.CompareTag("Player")) return;
	player = other.GetComponent<Player>();
	if (!player) return;
	if (player.GetColor() != orbColor) return;

	// timer for player standing in front of painting
	hoverTime += Time.deltaTime;
	if (hoverTime < .5f) return;

	hoverTime = 0;
	// check that we're not at the outer edge of the maze (no otherCell on parent)
	var mazecelledge = GetComponentInParent<MazeCellEdge>();
	if (!mazecelledge) return;
	if (!mazecelledge.otherCell) return;

	// stop the player and teleport them to otherCell's location, then reset color and movement

private void OnTriggerExit(Collider other)
	if (!other.CompareTag("Player")) return;
	hoverTime = 0;


Project Details

Skills Needed:



Project Images


Leave a Reply

Share This: