The Inspiration

The project was inspired by classic “call and response” rhythm games and the viral word-on-beat challenges found on social media.
I wanted to create an interactive experience that tests not only a player’s sense of rhythm, but also their ability to process visual cues and translate them into speech in a split second.


Building the Experience

I built the game using a dual-phase loop system: the Reveal phase and the Repeat phase.
Each round is exactly 5 seconds long, divided into 16 precise beats.

  • Reveal Phase (2.5s): The Lens “speaks” the sequence using 8 icons and a rhythmic chant.
  • Repeat Phase (2.5s): The player must repeat those 8 words in perfect sync with the beat.

The difficulty scales across 4 levels, moving from simple repetitive patterns (Easy) to complex tongue-twister sentences (Impossible).


The Technical Logic

To ensure the graphics never desync from the audio, I avoided standard timers.
Instead, the entire game state is tied to the Audio Component’s playback position.

The current beat is calculated by mapping the audio position to a constant beat duration:

$$ BeatIndex = \left\lfloor \frac{(MusicPosition - IntroOffset) \bmod RoundTime}{BeatDuration} \right\rfloor $$

This ensures that even if the device experiences a frame drop, the icons remain perfectly locked to the “Moo Ma Ga Gai” rhythm of the soundtrack.


Challenges Faced

The biggest hurdle was state management across multiple levels.
With 4 difficulty levels and 5 rounds each, manually managing 160 different beat states was impractical.

I solved this by creating a Procedural UI Mapper. Instead of hard-coding every icon change, I built a lookup dictionary that automatically fetches the correct texture and text based on the current Level and Round index. This kept the code lightweight and made adding the Impossible level effortless.

Another challenge was UI feedback. I implemented a dynamic scaling system that pulses the active icon to 130% of its size, providing a clear visual cue so the player knows exactly when to speak.


What I Learned

  • Audio-Visual Synchronization: Using audio playback position as a master clock for game logic.
  • Data Structuring: Organizing complex game data into nested arrays to support multiple difficulty levels.
  • User Guidance: In fast-paced games, text alone isn’t enough—color (alpha transparency) and scale animations are essential to keep players focused.

Built With

Share this project:

Updates