Quickly add music and scores to Unity games

18 May

Two weekends ago I decided to do a little “personal game jam” to see how much could be created with the Unity engine in a short time. The result was okay, but it was clear that I needed to spend less time on setting up little things. Some basic features (like a mute button) didn’t even make the cut due to time.

I have a “bootstrap” system for menus, music, sound, etc. that could be used, but it was total overkill for a simple weekend game project. Most of what’s in it would remain unused. I need a simple – “drag > drop > forget” type of system where only what is needed gets included.

So, off I went to work looking for some simple, lightweight assets to make things a bit easier. I just want, for instance, to drop in a prefab to provide background music with a mute button. If that’s out there… I couldn’t find it.

In response, my bootstrap is getting replaced with a series of small, independent prefab assets that can be quickly added as needed. As opposed to centralizing everything (as my current bootstrap does) it works in a more modular fashion. This way it can be used for projects big or small without unnecessary overhead/complexity. In the spirit of sharing, the entire thing will be released into the wild as free software! 🙂

The first two pieces of this system were pounded out last weekend. sumMusic and sumScore provide very basic systems that can be dropped straight into a game and used. The code and prefabs are licensed under MIT, and the assets are Creative Commons 0 releases by Kenney. Anyone can use them, for any project, without worry. Enjoy!

(The game was not released publicly as it was pretty specific to my Planetside 2 outfit – BRAC. If you really want to check it out send me a message and I’ll shoot a link your way.)

Leave a Reply

Your email address will not be published. Required fields are marked *