All projects
Unity · C#

Usagi Run!

2024Unity · C# · game · pac man

Usagi Run is a bird-themed Pac-Man I built solo in Unity and C# for a UTS games assignment. You weave through a maze eating pellets while four ghosts hunt you, and grabbing a power-pellet flips the chase — the ghosts turn frightened and flee. It reimplements the classic Pac-Man systems from scratch rather than leaning on an engine template.

The most involved part is the ghost AI: each ghost runs one of four distinct movement modes — chase the direction closest to the player, flee the farthest, move randomly, or scatter to a corner and then wall-follow — and all of them switch to flee while a power-pellet is active. Navigation is grid-based on top of a custom tween engine (movement duration = distance / speed, no third-party tween library), with raycasts detecting walls and the ghost-house door. The player controller adds input buffering so a queued turn fires the instant the maze allows it, giving it the responsive feel of the original.

Around that sits a Tilemap maze built by a quadrant-mirroring level generator, a frightened-mode timer with a recovering blink state, particle and positional-audio feedback, and PlayerPrefs score and best-time records. The whole thing was developed on a proper feature-branch and pull-request workflow across staged milestones — unusual discipline for a solo student game.

Key features & challenges

  • Four distinct ghost AI behaviours — chase-closest, flee-farthest, random, and scatter-to-corner-then-wall-follow — all switching to flee during frightened mode
  • Raycast-based wall and ghost-house-door detection driving grid navigation
  • A from-scratch tween engine for smooth grid movement (duration = distance / speed), with no third-party tween library
  • Input buffering so a queued turn fires the moment the maze allows it, matching the original's responsiveness
  • Tilemap maze from a quadrant-mirroring generator, plus a frightened mode with a recovering blink state

My contributions

  • Solo build — every system: player controller, ghost AI, movement/tween engine, maze generation, audio, particles, and records
  • Developed on a feature-branch and pull-request workflow across staged milestones