Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

Gosu: A Cross-Platform 2D Game Development Library for Ruby and C++

By Peter Cooper / August 16, 2007


Gosu claims it's the "coolest gamedev library around." That's pretty hard to qualify, but with a focus on Ruby, I won't be one to argue. It's installable as a gem, with a simple gem install gosu, is MIT licensed (although the sound component is third party closed source), and works on OS X, Linux and Windows. It supports 2D graphics (accelerated with your 3D hardware), sound, and various forms of input (keyboard, mouse, gamepad, etc).

(Note: Sorry for the slow flow of posts on Ruby Inside this week.. I still have no broadband due to the house move, but it will be back on in the next few days.. and there's a great flow of Ruby news that has built up coming your way.)


  1. Greg says:

    Maybe I'm doing something wrong, but after I install gosu using gem, gosu isn't available to require. So far I've only tried this on Mac. Anyone else have this problem?


  2. zerohalo says:

    Rubygame ( also looks promising.

  3. Ryan Daigle says:

    For a great summary of Ruby game development be sure to check out "Andrea O.K. Wright's talk at the recent Ruby Hoedown":

  4. AndrewO says:

    Greg: had the same problem. You need to add require 'rubygems' to Tutorial.rb (or open it using ruby -rubygems Tutorial.rb).

  5. AndrewO says:

    Oh, and to get the CptnRuby example working, you'll have to change the name of the Gem class to something that doesn't conflict the Gem module from Rubygems. Tsk, tsk... no namespacing...

    That said, this looks pretty cool and I'm definitely looking forward to playing with it.

  6. Julian says:

    Greg: Did you require 'rubygems' before requiring 'gosu'? Then it works for me (Mac too). Note that when installing as a gem, there's a name clash in one of the samples, CptnRuby.rb, so you'll have to add "Gem = nil" before "class Gem".


  7. Scott Thorpe says:


    you have to require the file located in the folder.

    PM if you have questions. aol:salve345


  8. zerohalo says:

    @greg: I believe you have to copy into your program folder.

  9. David Richards says:

    Hey, gosu is good stuff. I ported some game logic i made a year ago that rendered using rmagick to it in a few hours (tho I did go spagetti, it was not gosu's fault. )

    re: Ryan Daigle Says:
    The link to the correct video above should be:

Other Posts to Enjoy

Twitter Mentions