Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
/ motion-gosu Public archive

RubyMotion (iOS) port of Gosu

License

Notifications You must be signed in to change notification settings

gosu/motion-gosu

Repository files navigation

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.

Resources

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.

Beware

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.

License

MIT.

About

RubyMotion (iOS) port of Gosu

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published