Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit) (+1)

Sure. In the most basic terms there is a bank of 29 loops, they run for 4 lots of 4s so 16 beats in total at 80 BPM. Each loop has a random int assigned to it on load that act as the odds for it being used at any point. Sometimes it will be a very likely option and sometimes it will be very unlikely. As it plays it goes through 4 steps of intensity, so min to max if you like. When it's minimum the odds are most stacked against any loop being selected so it is less busy, at it's max then you are more likely to have lots of them in play. There are a few other factors which govern what will be selected at any point. The combination of random odds, random selection and intensity mean that it's almost impossible that any of you will hear the music in the same way. Some of you will hear the poorest possible configuration and someone will hear the best. I made all the loops in Garageband and experimented with combining then to try and reduce anything that clashed. They are all in D. I wrote the code using the standard playscheduled stuff in Unity. https://docs.unity3d.com/ScriptReference/AudioSource.PlayScheduled.html