Gosu logo

Getting Started

On Windows, you can install Gosu through RubyGems:
gem install gosu
Installation instructions for macOS | Installation instructions for Linux

Example Code

Gosu has a companion gem for examples (gosu/gosu-examples on GitHub).
gem install gosu-examples
gosu-examples # ...to show the example box

You can select examples from the right sidebar and jump straight into the source code by pressing S.

Tutorial

We recommend starting with the Ruby Tutorial on the wiki. For more documentation, check out the links in the sidebar.

Other useful RubyGems

There are several libraries that can give your games extra superpowers. Some of these libraries have not been updated in a while, so watch out for open issues on their GitHub pages.

gem install releasy (Spooner/releasy)
Automatically distribute any Ruby game as a Windows executable or Mac app.
Built on top of the tools from the Deployment guides in the documentation wiki.

gem install texplay (banister/texplay)
Pixel-based drawing on Gosu images. (forum post)

gem install ashton (Spooner/ashton)
A C extension that integrates GL shaders and a particle engine with Gosu.

gem install gamebox (shawn42/gamebox)
A comprehensive game framework based on Gosu (website).

gem install chipmunk (beoran/chipmunk)
A Ruby wrapper for the popular Chipmunk physics library. There’s example code in the wiki.

gem install opengl (larskanis/opengl)
The standard Ruby OpenGL gem can be used with Gosu to add 3D effects.
(gosu-examples come with an example game, and there are good tutorials by tjbladez.)

gem install rmagick
A powerful alternative to TexPlay, but very hard to distribute.
(gosu-examples comes with an example game. RMagick is mostly useful for experiments and internal tooling.)