Avatar Runner: Coding to the beat

I won’t hide the fact that I love Audiosurf and it is no doubt one of the major influences in why I wanted to create Avatar Runner. The look, vibe and scoring are all of course very different with Avatar Runner having a (hopefully!) cheerful feel to it but at the heart of it, the game is about playing along to music.

Audiosurf works by analysing the entire song and building up the track. Whilst the XNA framework does provide analysis of audio, it requires the song to be playing. Unfortunately for in order to know what is coming next and create a nice and exciting run I would need to play through the entire song first. That is some loading time!

With the songs currently in the game I was able to analyse the music myself and plot turns of pace, increased spawning and colour of items. However that isn’t possible for the Custom Mode where you can play any track from your music library. I would imagine many people would find this mode an attractive option therefore I still wanted to have some way of slowing down the player when there’s a lull in the song as well as providing pace for the more exciting parts. To achieve this I’ve done a few calculations based on the visualisation data provided by XNA and have been able to tweak the player’s pace and spawn rate to match the song. It ain’t the perfect solution but it still provides a great gameplay experience, unlike anything currently on Xbox Live Indie Games.

Checkout this video of me playing along to two great tracks on my personal Xbox Music Library!

Leave a Reply