Musical Domino Battle 🁠 🁠 🁠 🎵

2 years ago
17

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 :)

If you would like your name included in the next leaderboard, here is my Patreon page: https://www.patreon.com/doodlechaos
Discord: https://discord.com/invite/7FCrWAzDY7 (I spoil what the next video will be pretty often here)
Twitter: https://twitter.com/doodlechaos
Official tiktok: https://www.tiktok.com/@doodlechaos
Shorts Channel: https://www.youtube.com/channel/UCMqgJk1o2eWE7WeNtRIfnpg
Instagram Shorts: https://www.instagram.com/doodlechaos_shorts/
Email: contact@doodlechaos.com

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!

Fun fact:
This channel started with chain reaction and domino art. There's a show called Domino Masters that I worked on last year behind the scenes for about 3 months (My name is in the credits!). The first episode just came out so I made this video to celebrate the occasion.

Loading comments...