For this project, I wanted to explore create a Disney/Pixar themed game. I got inspired by the core memories idea in Inside Out and subway surfers which e which was my favourite game to play growing up and so I decided to design an Inside Out racing game.
The digital game, built in p5.js, represents the mental world of a child’s mind. At first, the user enters his/her core memory and then the race starts. The player dodges Disney villains (representing negative emotions like fear, jealousy, and anxiety) and collects Disney heroes (representing friendship, family, hope, and self-acceptance) as power-ups. As the player progresses, either Joy or Sadness physically moves forward on a real-life race track depending on the player’s choices and collisions. If Sadness wins, a memory ball turns blue. If Joy wins, it glows yellow.
The goal of the game is to protect the player’s game memory and collect as many power ups as possible so that joy wins and the memory ball turns yellow.
How It Works:
The p5.js Game:
The main game interface is a side-scrolling runner similar to Subway Surfers. The player character avoids villains (like Scar, Maleficent, or Ursula) and collects heroes (like Buzz Lightyear, Elsa, and Baymax). Each obstacle or power-up has a symbolic connection to an emotion or social concept:
- Jealousy→ Evil Queen (Snow White)
- Fear→ Randall (Monsters Inc.)
- Anxiety→ Mother Gothel (Tangled)
- Friendship→ Woody and Buzz
- Family→ Elsa and Anna
- Self-doubt→ Forky (Toy Story)
- Memory Loss→ Dory
- Stereotypes→ Judy Hopps and Nick Wilde (Zootopia)
When a villain is hit, Sadness moves closer to the finish line. When a hero is collected, Joy moves ahead.
The game is built using OOP principles and screen transitions, just like in my previous project. Each frame checks for collisions, updates the character’s position, and sends signals via serial communication to the Arduino based on whether Joy or Sadness should move forward.
Arduino:
The physical track features 3D-printed figures of Joy and Sadness mounted on sliding mechanisms (like small carts or servo-driven platforms). The Arduino receives signals from p5.js via serial and moves either character forward in small steps.
At the finish line, each figure holds a translucent memory ball (ping pong ball or resin sphere). Using RGB LEDs, the Arduino lights up the ball:
- Yellow: for Joy (Emotion: Happiness)
- Blue: for Sadness (Emotion: Nostalgia/Grief)
Challenges:
One big challenge I’m still figuring out is how to power the LEDs inside the moving figures.
I’m also still testing how I’ll light up the memory ball when the character reaches the end. It might involve placing a proximity sensor at the finish line, or coding a timer that tracks when one character hits the end point based on movement count