NokiMo
doodlechaos
doodlechaos

patreon


Musical Domino Battle

I built a simulation in Unity to spawn dominoes that can play any MIDI file. White dominoes are solely used as connecting lines, while colored dominoes emit a sound when they are first collided with. To spice things up, I turned the whole project into a game for the patrons to try and collect as many dominoes as they can in their own individual buckets. 

Session and lifetime leaderboards are at the end of the video :) 

Music: Debussy - Clair de Lune  

Challenges I ran into with this project: 

1. When a domino line splits, it slows down since it has to spread it's force across 2 dominos instead of 1. This causes problems for music synchronization, because I had different notes playing at incorrect times. To solve this, I have a target z coordinate that moves along with the backwall. When a domino toppling surpasses this target z, I increase the drag of its rigidbody to slow it down in scale with the distance ahead it has progressed. Similarly, when a domino falls behind, I apply a rotational force of magnitude equal to the distance it has fallen behind to speed it up.  

2. Sound. My intent was to create a satisfying ASMR like sound for the dominoes toppling. Turns out this is much more difficult than I anticipated. Unity couldn't handle the number of overlapping audio clips I was looking for well, so exported the collision data to a file so I knew what time every collision happened and what type the domino that collided was. Then, I used python to convert this data into audio samples of my choosing. After a bit more processing in FL studio it turned out decent, but definitely not ASMR level. I did learn a lot about audio synthesis from this. Making realistic sound for my physics simulations has always been a constraint for my videos, and I think this was a step in the right direction!

Musical Domino Battle

Comments

I love the competition videos! (Maybe that's because I've always ranked near the top...)

O. hannah

I love your creativity and skill.

Sparkasaurus


Related Creators