Inspiration

We all love programming. Most of us love Guitar Hero. Why not combine the two? With Programmer Hero, you can simultaneously code your software and play a famous song! What else would you need?

What it does

The song is procedurally parsed. The song is then split into beats and those are displayed on the screen like Guitar Hero would do. Every time you successfully hit a beat, a token is inserted in the background to a source file.

How we built it

We used OpenGL for Graphics, and Haskell, a statically-typed, lazily-evaluated, purely functional programming language for coding up the backend and the game-logic. For source code management, we used Git. To play the Midi file, we also had to write a Midi-player for a software synthesizer, for example, SimpleSynth on Mac OS X.

Challenges we ran into

We had to parse a song for its beats and figure out how to properly limit them when the frequency was too high. Also, graphics and pure languages, especially lazy ones, are not a good fit, so it added an extra hussle.

Accomplishments that we're proud of

We managed to overcome the pureness of Haskell and use advanced features of Haskell (type-level EDSLs, etc) to solve the problem. Using OpenGL in a stateless programming environment has posed its own challenges, but we managed to learn a lot about how OpenGL internally represents their structures.

What we learned

OpenGL is strict, and we as Haskell programmers sometimes depend on laziness. If OpenGL decides to evaluate something we didn't originally want it to, our program deadlocks. We have to be careful every time we access OpenGL.

What's next for Programmer Hero

The level generation method could be made better using more sophisticated mechanisms for beat detection, like Fast Fourier Transform. We could add more levels to the game, increasing the difficulty level-by-level.

Built With

Share this project:

Updates