RubyMotion (iOS) port of Gosu
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
GosuKitTests Update motion-gosu for gosu/master interface Sep 5, 2018
lib Ruby gemspec May 17, 2015
.gitignore Unit test projects for Gosu and GosuKit May 25, 2015
GosuKit.podspec Code style adjustments May 5, 2018
Podfile Code style adjustments May 5, 2018
Podfile.lock Update May 5, 2018
motion-gosu.gemspec Ruby gemspec May 17, 2015

motion-gosu & GosuKit

motion-gosu is a set of RubyMotion wrapper classes GosuKit, which itself is an Objective-C wrapper layer around Gosu. This combination can be used to compile Ruby/Gosu games for macOS and iOS. The resulting games can then be published on the iOS and macOS App Stores (in theory – nobody has tried this yet).

Project Setup

RubyMotion projects work a little differently than normal Ruby/Gosu projects. Please take a look at the example project that you can use as a template for your own projects.

Steps to run the example project:

  • example.rb is a ‘classic’ Ruby/Gosu script that can be run without RubyMotion. This is useful during development because it reduces friction (no compilation). This script uses require_relative to include files from the src folder, and loads media files from the media folder. Run the game using: brew install sdl2; gem install gosu; ./example.rb
  • Both the osx and ios subfolders contain RubyMotion projects which use Gosu through a combination of Bundler and CocoaPods.
  • To install the latest version of gosu-motion (the Ruby wrapper around GosuKit), go into each folder and run bundle update.
  • To install the latest version of Gosu (the C++ core) and GosuKit (the Objective-C wrapper), run bundle exec rake pod:update.
  • You can then run the macOS and iOS versions of the game using bundle exec rake in either directory.

Note that both ios/resources/media and osx/resources/media are simply symbolic links that point to the root media directory.

While most of the template project can be copied for your own projects, you will always need to update osx/Rakefile and ios/Rakefile, which contain the RubyMotion project configuration.


The example project is not ready to be uploaded to the App Store – it has no icon, for example. These parts of the RubyMotion project setup are outside of motion-gosu’s scope. Please look at the RubyMotion developer guides and join the Motioneers Slack channel for further assistance.


This project is work in progress right now, and debugging Ruby/Gosu games with RubyMotion has proven quite painful. Feel free to send a pull request if you know how to make things a little smoother, or let me know if you need commercial support.