Hello,
I’m a musician who’s a complete programming nerd but I’ve started to get very interested in making some simple games.
I’m currently using the extremely simple Game Maker software, which I’m quite enjoying, but I’m very aware of its limits.
One of these (somewhat) limits is in terms of dynamic music. That is to say, music that change depending on what’s happening.
By this, I don’t mean, “at x point the music changes to a different point”, rather, for example: “if character gets hurt, remove an instrument from the currently playing son”.
For example, let’s say this is a Super Mario clone. The default state could have a regular song with drums, piano and guitar. If you grab a mushroom, a new track, the violin for example, would be added as a counter melody to the guitar’s part. Then, let’s say you lose your mushroom and you’re just about to die, then maybe all that is left is a thumping bass drum. The song and rhythm remain the same throughout, but the instruments playing the song change based on certain things that the player does.
With Game Maker, I can very clumsily make this happen.
As far as I can tell, Game Maker only recognizes individual sound files. So if you wanted to add an instrument, you’d have to swap out your current song with the same song but with more/less instruments playings. The obvious problem here being that you would lose your place in the song and it would have to start again from the top. What I would want is for the new instrument to start playing/drop out at the end of the bar.
The one solution I have (somewhat) come up with, and its not pretty, would be:
HUNDREDS of small audio files. Each one containing a bar of music, everyone different since they all contain different amounts of instruments.
For example: Track 1 = First bar with bass drum alone. Track 2 = First bar with bass drum + piano. Track 3 = First bar with bass drum + piano + guitar. etc. Track 4 = Second bar with bass drum. Track 5 = second bar with bass drum + piano etc. etc. etc.
This would allow you to create variables such as "if collision with badguy, and you are using track 2 (1st bar; piano + drums), then switch to track 4 (2nd bar; drums). In other words, you would maybe get hurt during the first bar of the song and by the time you get to the second bar it will have dropped from two instruments to just one.
This, as you can see, is a real headache and would create thousands of song files within a game.
I’ll admit I do not know how to use Unity 3D yet… I’m mostly “browsing” around the different game engines to see if this is possible on any of them. From what I’ve read, Unity 3D is a fantastic engine which is (relatively) straightforward to use.
That said, I realize my current query is rather technical, so maybe this isn’t possible with Unity 3D – and if not, is there a game engine you could recommend for doing something similarly?
ideally, I wouldn’t have countless small song files, but rather larger ones that I could tell to remove/add instruments with certain variables (sorry, I only know the Game Maker jargon – not Unity’s!!).
Thanks for your help. I’m really interested in this game engine and I hope this first question wasn’t too long!