Mar 12, 2015 - Killer music


Music in games is often relegated to the background, little more than filling the silence, pasted on as an afterthought. Recently I’ve contribute to the open source match-3 puzzle game FreeBlocks, and the surprising quality of the music reminded me of the value of music, that it can not only enhance but elevate the game to new heights.

Good music

But first let me show an example of music done right: the main theme of Enter the Dragon. I love music but there’s so much bad and badly-used music out there, and most people don’t care. I have a depressing anecdote where a jazz musician played a gig for a large dinner party, and received the following feedback from the client:

You guys were perfect! We hardly noticed you were playing.

People didn’t care about what they played, let alone how they played it. They only cared that there was something to fill the silence. Most people, from games to movies, treat music the same way. All it had to do was fit and stay unobtrusive; who cares whether it was “memorable” or “moving”? E.g. scoring a desert level? Just find some vaguely-Arabic music and call it a day!

Well Enter the Dragon cared. The main theme tells you exactly what this movie is about, with not a hint of subtlety, and all in the first minute no less. All you have to do is pay attention. Try for yourself: see if you can figure out what the movie is about, by listening to the music alone:

Kiais and Asian instruments? Kung fu. Blending into electric bass? Possibly set in some East-meets-West locale. Funky wah-wah guitar? Blaxploitation. Diminished chord? Something sinister, possibly involving spies and conspiracies. Yes, everything in the music tells you something about the movie, in no uncertain terms. It gets better if you watch and listen, as the music changes right on cue to what’s happening on screen - the stars’ names, their first appearances, changes in the scene. If you were to guess that this is the work of a master composer, you’d be right.

To take a gaming example, one of my favourite video game soundtracks is Sonic 3, due in no small part to collaboration with world-class musicians. For example, stage 1 of the game, Angel Island Zone, takes place in a tropical jungle environment, so the music is suitably cheery and Carribean with steel drums and xylophones. At the end of Act 1 however, the jungle is set on fire, with the level palette changed to an omnious orange and brown, an excellent signal for the ramp-up in difficulty. What’s really clever though is the music: Act 2 has a different track, but listen and compare the two tracks:

Notice anything? The two are versions of the same piece, one in a major key and one in minor! They have essentially the same structure too. The music is saying, “Act 2 is like Act 1 only darker and harder”, which is also what the graphics are saying. The same compositional technique is used in stage 2, where the sleeker and faster Act 2 (with its jets and speed wheels) is reflected in its music.

Match 3 harmony

Moving back to FreeBlocks; I was looking for additional music for the game and found this excellent piece by pixelsphere, and by sheer coincidence the music happened to be in the same scale and tune to the sound effects, which gives the game a very calming, musical quality. Listen and judge for yourself:

Although music theory - and sound design in general - is often overlooked in games, it can be used to give an extra amount of polish that makes a game stand out. Candy Crush Saga is a notable example, where all its sound effects are in the same scale.

Listen to the xylophone play an arpeggio as consecutive matches are made.

Prolific sound designer Aaron Marks puts his musical background to use:

I definitely have some techniques where I ‘tune’ sound elements to be either pleasant or something a little more harsh. I also tend to pay attention to the music that is accompanying a scene or game level and often tune the sound effect to a note which blends well or I’ll go the opposite direction and detune it, especially for evil characters and their weapons, for example. source

All this really goes to show that, yes music is overlooked, but all it takes is a little extra effort to craft something that’s special and above the norm. For me personally, this was proven in our game for Global Game Jam 2015, where I worked with the talented sound and music designer Matthew Chin. In addition to creating a killer music track, we decided to have two layers of the track, one calm and one frenetic, and fade dynamically between the two based on the action on-screen. The effort paid off in the form of taking the best audio prize; listen for yourself:

So next time, hit up your sound designer and make some killer music!

Mar 6, 2015 - Bounties for your game


Many open source projects are supported by bounties - cash rewards for specific work done. Have you ever wondered about doing so for games? Well I did, and tried it with C-Dogs SDL, and it was awesome.

The Bounty

A month or so ago I looked into open source bounties. I knew that for very popular projects, businesses used bounties to fund the development of features. The sum of self-interested funding improved the overall project, benefiting all users.

But not all projects are in this enviable place. Open source projects, like many things, follow a power law distribution: there are a few that get outsize attention, and a vast majority of mediocre ones languishing in one form or another. C-Dogs SDL is one of them, which gets a few drive-by contributions, but is mostly worked on by me alone. Will bounties help here, by attracting eyeballs, or even contributors who get things done?

I found out more after settling on Bountysource as the funding platform. A first look confirmed my suspicions: most of the funding were for super-popular projects (like Firefox) or those that had strong commercial ties. For games this was even more stark; the only project bothering seems to be OpenRA, one of the top open source games and much more notable than C-Dogs SDL. Either bounties just didn’t work for small projects, or they do but most people either don’t bother, or do it via other channels. I hoped it was the latter.

In the end I chose this task for the bounty: deploy binaries via Travis CI. There were plenty to choose from, but most weren’t suitable; they were wishlist tasks that didn’t have a clear scope, or required deep knowledge of the game code. This one however was almost perfect; it was small and required no code changes. Build and CI procedures were already set up and well documented, so in theory it is just researching Travis CI docs and setting up config files. I posted a modest bounty, and waited.

The bounty languished in obscurity.

The Contributor

One nice thing about GitHub is lots of analytics, including one for traffic, which shows how many views and clones you’re getting, and from where. There were hardly any from Bountysource.

Enter William “meZee”. After more than a month of inactivity, he got in touch out of the blue, when I had all but forgotten about the bounty. “Excellent!” I thought; it seems that bounties don’t bring in visitors, except the ones that count: contributors.

And then, radio silence.

Open source development is a lonely endeavour. The freedom that authors grant to users contributes to this, since people can use, hack, extend, even fork without bothering the authors. Most work is done by unpaid volunteers, who pick up and drop projects on a whim. Did meZee just take a break? Silently drop the task because it was too hard, not worth it, or too boring? I had no way to tell.

One week later, a flurry of activity! It turns out that getting two cloud services (GitHub and Travis CI) to talk to each other can be fiddly - who knew! - but the task was done in short order. I got an annoying task done, meZee got some cash and knowledge, and he even wished to contribute more! I couldn’t have wished for a better outcome.

Do they work?

This was an excellent experience, if a bit belated. It is still early days though, but overall I’m very satisfied and will try bounties again. Time will tell whether bounties:

  • attract other contributors, not just those motivated by the money
  • attract users in general, by signalling that there is real dedication in a project
  • discourage volunteer contributors, since they may as well wait for bounties to be posted

I believe that a lot of potential contributions are held back by small barriers, and most contributions are from extremely motivated and knowledgeable people. Perhaps in this case, the small bounty was enough to nudge one person into becoming a contributor, and that alone is worth the price. Bounties may have a long history but they still have a ways to go, as evidenced by the sparse project selection in Bountysource. But if more people jumped in, it has the potential to become a powerful form of crowdfunding. Is there a feature you want or an issue fixed in an open source project? Post a bounty; you may be pleasantly surprised.


  • Open source projects progress at their own pace, as unpaid volunteers work from their free time, so be patient.
  • If you want contributors, break down all the barriers, and even more! No one wants to spend days setting things up, learning a code base, and contributing changes, with no guarantee of it being accepted, so why should your potential contributors? Everyone wants to start small and test the waters, so place a high priority on removing barriers.

Mar 5, 2015 - First Post!


This will be a personal blog of sorts, where I talk about game dev and related stuff, that’s not project specific. When people want to find out about what I’m up to or what I can collaborate on, I can point them here.