Gosu
Thursday, May 22nd, 2008 by Michael
TOJam was great fun, though I felt a little like a fish out of water. I haven’t used C++ in a while, and the last time I did anything serious with Visual Studio I had not yet gone to university.
As a result I spent most of my time writing game logic, the things which are more or less the same in any language, and didn’t touch much on things like SDL at all, leaving it in the hands of teammates more experienced. That was good for the team, but not for my learning. So when I got home, I took all the media files and the knowledge I had gathered, and re-wrote the game (with some gameplay changes that I wanted to try).
What makes this special was that I re-wrote it using a Ruby library called Gosu.
And I did almost single-handedly in under 48 hours.
Gosu has almost everything that a programmer who wants to play with game development could want. Installing is dead simple “sudo gem install gosu” and it is the shortest path between “blank file” and “image on screen” that I’ve ever seen.
One niggle, it doesn’t play mp3 music by default — you have to recompile that flag and assert you have permission to use that codec. Oddly enough, mp3 samples work just fine. I cannot pretend to understand this.
Regardless, if you like Ruby, and you want to make 2d games, I’d recommend it giving it a look. The minimalist design philosophy is excellent, and the time investment to get reward is very small. Rapid iteration makes for a very agile development cycle, which is a great thing when you’re shifting and twisting the code around to, as Miyamoto would say, “find the fun.”



