Surfing

April 16, 2010 · Posted in Blog 

A while (probably a few years ago) I came accross a fun little game called Audiosurf. About a week ago I was bored and decided to play it again for a bit.

For those of you unfamiliar with it, Audiosurf is a music-based game. The idea is that you can select any song from your hard drive (or audio CD), and the level you play through is generated based on the music. You control a sort of flying-car-thingy that you can move left and right accross a thing that resembles a highway with 3 or 4 lanes, and the object of the game is to pick up colored blocks that appear on said highway. When you get clusters of at least 3 blocks of the same color, the blocks magically vanish, and your score magically goes up. There are of course a few things to worry about, but if you can think quickly and anticipate what’s coming, it’s not too difficult.

Again, the level is based on the music, so if you have really calm music it’ll be slow and mellow and there won’t be a whole lot of blocks to worry about, but pick some intense music and there will be tons of blocks, the track will quite possibly be twisting and turning, and you have to think REALLY fast to pick up what you want and avoid what you don’t want.

It sounds pretty simple, and yeah, it is pretty simple, but it’s also really addictive, and the just-one-more factor for this game is incredibly high.

Then came, The Idea.

This game bases the tracks on music, and since it keeps online high scores, there cannot be a random element as to how it generates the tracks (because that could create unfair advantages for some players). This means it just picks the audio file apart and works with that, basing its decisions on things like when beats occur, the tempo of the song, the presence (or absence) of certain frequency ranges, the shifts in frequencies throughout the song, and so on.

What if you can figure out exactly how the game’s algorithm works, and use the knowledge to create a sort of ‘level editor’ for the game, which in turn generates .mp3 files that, when played in Audiosurf, recreate exactly whatever level you had in mind? There are a few restrictions of course (for instance, the game never places two blocks directly adjacent, because then it’d be impossible to pick them both up, or it could create a ‘wall’ of blocks that you cannot pass through without picking up at least one of them). And sure, it’s going to sound horrible, with lots of bleeps and noises, possibly much like what happens when you listen to the signal from a 56k modem using a phone, but it’d be pretty neat.

No, this is not something I’m actually going to do (I’m not that bored, or at least, not at the moment), but it’s a fun thought experiment.

Comments

Leave a Reply