A simple game in ruby where a ship travel int the space to collect stars. The more stars it collects the greater its score become.
In October 2015 I attended a Ruby course and I was looking for something interesting to implement with this language. Looking around the web I found Gosu. It is a Ruby library for Game development, for more information on it visit its wiki on github. In this wiki I found the gosu_examples a tutorial to build an easy game step by step. The reason why I cloned the project is to have it on Github and have the possibility in the future to improve it.
Here the necessary steps to run SimpleGameInRuby. The assumption here is that you are using Windows as operating system. For Linux and Mac the differences should me minimal.
- Download Github from here and install it on your Windows.
- Download Ruby from here and install it.
- Open a github shell
- Run the command: _cd c:_
- Run the command: git clone https://github.com/sasadangelo/SimpleGameInRuby.git. The folder C:\SimpleGameInRuby will be created with source code inside.
- Open a dos shell
- Run the command: cd c:\SimpleGameInRuby\stepX where X is a number between 1 and 5.
- Run the command: gem install gosu. This will install the Ruby game library gosu. If you got a SSL connection problem check the troubleshooting section.
- Run the command: ruby GameWindow.rb to start the video game.
If step 8 fails for a SSL connection problem this is a well known ruby issue. To solve it do the following:
- Download the following pem certificate
- Run the command: gem which rubygems. This command will print a path like this one /lib/ruby/2.1.0/rubygems.rb. You must store the pem certificate in /lib/ruby/2.1.0/rubygems/ssl_certs.
- Run again the command: gem install gosu.
Thanks to Gosu Team for the publishing of this tutorial.