Skip to content
Flexible cross-platform game programming library for Ruby
Find file
Pull request Compare This branch is 12 commits ahead of rubygame:next.
Latest commit 9d0d5dc Apr 8, 2011 @jacius Added method Surface#[].
Failed to load latest commit information.


= Rubygame README

== What is Rubygame?

Rubygame is a cross-platform game-development library for Ruby,
inspired by Pygame. Rubygame strives to empower game developers by
providing them with powerful and flexible mid-to-high level tools.
Instead of worrying about low-level technical details, you can focus
your energy on more interesting things (like making a fun game).

=== Relevant Links
1. Rubygame:
2. Ruby:
3. Pygame:

== Requirements

You will definitely need these software packages to use Rubygame:

* Ruby          >= 1.8.6
  * Or, JRuby   >= 1.4
* Ruby-SDL-FFI  >= 0.4
* SDL           >= 1.2.7   (1.2.14 on MacOS X 10.6)

It's highly recommended that you have these packages as well, or some
cool features won't be available!

* SDL_gfx     >= 2.0.13
* SDL_image   >= 1.2.3
* SDL_mixer   >= 1.2.7
* SDL_ttf     >= 2.0.6

For running the spec suite ('rake spec'), you will need:

* RSpec   >= 2.4
* RCov    >= 0.9   (only needed for 'rake rcov')

== Install

=== Basic Install

The simplest way to install is with RubyGems:

 $ sudo gem install rubygame

Another way is to install directly from the source:

 $ sudo rake install

Or generate and install a gem from the source:

 $ rake gem
 $ sudo gem install pkg/rubygame-*.gem

=== Generating documentation

You can generate documentation for Rubygame's API by running:

 $ rake rdoc

Documentation will be generated as HTML in the 'html' directory.
Open 'html/index.html' in a web browser to get started.

== Usage

See the documentation (online at, or
generated locally with the 'rake rdoc' command). 

We also recommend that you take a peek at the demo applications in
the 'samples' directory, especially image_viewer.rb,
demo_rubygame.rb, and chimp.rb.

== About the version number

The version number of Rubygame has a strict meaning, to help you
decide whether the new version might break your application. The
version number has 3 parts: the major number, the minor number, and
the patch number. For the example of Rubygame 2.6.0:

    2   .   6   .   0

When a new release of Rubygame is made, one of the version numbers
will go up, and the numbers that come after it will be reset to 0.
Which number will go up depends on how much the Rubygame API changed:

- *MAJOR*: API has changed, and old apps _must_ be updated.
  An example of this is when a class has been significantly changed,
  or a method has renamed/moved to another module and the old name is

- *MINOR*: API has changed, but old apps will still work.
  An example of this is when a new feature has been added, or a
  method has been renamed but the old name is still supported.

- *PATCH*: API has not changed at all.
  An example of this is when a bug has been fixed, or existing code
  has been improved beneath the surface.

== License

Rubygame is distributed under the terms of the GNU Lesser GPL.
See LICENSE for more details.

Some of the sample files are distributed under licenses other than
the GNU Lesser GPL. See 'samples/README' and 'samples/GPL' for more

John Croisant (jacius at
Something went wrong with that request. Please try again.