Concept + How it Works
Inspired by Season 2 of the Netflix series Arcane, this project prioritize the experience of the concept while incorporating subtle interactive responses. On the first page, there will be a brief instruction of how the experience works. In simple terms, there will be an animated object floating in the screen once the user clicks one of the keys in the computer. This floating object, inspired by the “Wild Rune” introduced as a seed of destruction and chaos, is a colorful sphere floating in a dark space. In the series, this is an unstable, magical object that is constantly distorting and causing chaos around it. For this reason, in my project, this sphere will be open to drastic changes: From changes in size (growing and shrinking), to changes in speed, all while some of the most popular songs from the season’s soundtrack play.
Goal of the game: “Stabilize the Wild Rune”
From Arduino to P5
For the interaction, I aim to have p5 respond to two potentiometers and one button.
- Button 1 will allow the users to change the songs played in the background while the “game state” is active. After doing an array, each song will play on infinite loop while it runs in the background, and will only change when the player presses the button.
soundFormats("mp3", "ogg"); // Loading the sound file.
songList = [
loadSound("Woodkid_To_Ashes_and_Blood.mp3"),
loadSound("Blood_Sweat_&_Tears.mp3"),
loadSound("Imagine Dragons_Enemy.mp3"),
loadSound("Stromae, Pomme_Ma_Meilleure_Ennemie.mp3"),
- Potentiometer 1 will allow the users to change the size of the sphere. After connecting Arduino UNO on p5, once the user presses “start” they will be able to increment or decrease the size of the sphere by twisting the potentiometer. (As shown in the VIDEO)
- Potentiometer 2 will allow the user to change the speed at which the sphere is rotating. Just as the previous analog sensor, the second potentiometer will be accessible as soon as the Arduino UNO is connected to the p5.
// -------------------------
// READ FROM ARDUINO
// -------------------------
let data = port.readUntil("\n");
data = trim(data);
if (data.length > 0) {
// ---- POTENTIOMETER DATA ----
if (data.startsWith("P:")) {
let potValue = int(data.substring(2));
if (!isNaN(potValue)) {
sensorValue = potValue;
}
}
// ---- BUTTON PRESSED ----
else if (data === "BTN" && gameState === "playing") {
playNextSong();
}
}
}
// Smoothly transition sphere size
rune.size = lerp(rune.size, runeSize, 0.1);
// Draw the sphere
rune.display();
From P5 to Arduino
- If the player grows the sphere past a specific radius on the canvas, a red LED light will turn on. Once they fix the size or return to the home page, the LED will turn off.
- Similarly, if the player shrinks the sphere past a specific radius on the canvas, a red LED light will turn on. Once they fix the size or return to the home page, the LED will turn off.
- When the player keeps the sphere at a certain size, a green LED light will turn on and take the user to the “winning” page. The LED will turn off.
Background Songs:
Imagine Dragons feat. JID – “Enemy (Opening Title Version)” (from Arcane) [Official Visualizer]
https://youtu.be/UqcE-IIevf0?si=1fEAqWTDhATXA7Av
Woodkid – “To Ashes and Blood” (from Arcane Season 2) [Official Visualizer]
https://youtu.be/Gj-jmBi0aK8?si=6Yn53yDESy4y0R0K
Blood Sweat & Tears (from the series Arcane League of Legends)
https://youtu.be/ySbgRwQi3Rc?si=uf5mUQyy-rPUKWLz
Objectives:
- Add button to change music (in process)
- Add potentiometer to adjust speed of spinning sphere
- Fix Title (must show when the game begins (it currently doesn’t show since the text is used to showing on a 2D layer)
- Make the size (too big and too small) cause RED LED to show
- Make the right size cause the user to win (show GREEN LED)
Tasks completed so far:
- Created a sphere in a WEBGL space for the three dimensional elements to work (shades, colors, among others)
- Added potentiometer from p5 to Arduino to successfully grow and shrink the sphere
- Defined a structure of p4 including: Introduction page, “playing state”, “winning page”.
- Established the functions necessary for Arduino and p5 to exchange more than one piece of information (potentiometer + button 1)
- Downloaded and uploaded GitHub files to p5 , learned in class, to stabilize bidirectional serial communication
VIDEO
Main Inspiration: Arcane Season 2 Clip
https://youtu.be/8PU2iKx0YtQ?si=qtSexmSyrLLJLWcc
Chat GTP
Given the complexity of this project, I have used Chat GTP so far to assist me in organizing the code and guiding me step by step when something is missing or a mistake is preventing the code from running. For example, I struggled to make both the button and the potentiometer work at the same time, so I explained my situation to Chat GTP and it made me realize the error was in my code where the Arduino exchanges information with p5. It also helped me realize I hadn’t uploaded the files from Github, causing the port connection to malfunction.







Circuit Illustration