9 Replies - 2929 Views - Last Post: 20 June 2012 - 05:39 PM Rate Topic: -----

#1 pvt_jaime  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 20
  • Joined: 27-May 12

Question for using Ruby in Game development.

Posted 20 June 2012 - 12:17 AM

Im new to ruby but i have leanred the basics of what ruby is and what it does. I want to know what libararies are avaible for making a 2D game? Maybe for 3D? Im usng the Ubuntu of Linux IOs. Looked at some tutorials but i want to get some libaraies that can help out. Im trying to get OpenGL, SDL or something else thats crossplatform. Once i have that done, I need to figure out the right coding to get a windows up and running.
Any advice from the Ruby experts for learning ruby for game development. Im planning to stick with console type games for now but i dont know how to start it.

This post has been edited by xclite: 20 June 2012 - 06:52 AM


Is This A Good Question/Topic? 1
  • +

Replies To: Question for using Ruby in Game development.

#2 xclite  Icon User is offline

  • LIKE A BOSS
  • member icon


Reputation: 915
  • View blog
  • Posts: 3,193
  • Joined: 12-May 09

Re: Question for using Ruby in Game development.

Posted 20 June 2012 - 06:08 AM

Ruby can definitely be used for game development, though it's not as commonly done here as in other languages.

The two most common libaries I'm aware of are rubygame and Gosu. I'm under the impression that Gosu is more actively developed. There are also Ruby bindings for the SDL library.
Was This Post Helpful? 0
  • +
  • -

#3 pvt_jaime  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 20
  • Joined: 27-May 12

Re: Question for using Ruby in Game development.

Posted 20 June 2012 - 10:34 AM

View Postxclite, on 20 June 2012 - 06:08 AM, said:

Ruby can definitely be used for game development, though it's not as commonly done here as in other languages.

The two most common libaries I'm aware of are rubygame and Gosu. I'm under the impression that Gosu is more actively developed. There are also Ruby bindings for the SDL library.

Thanks xc. I tried to get the libaries for linux and everytime i do the command in terminal its saying that its a unknown directory. Im having problems with almost all libaries except rubygame. Gosu i saw it and im thinking about using it. Im using tutoirals from youtube(manwithcode), Its giving me some help on what to understand on what i have to be doing. Not much videos on how to learn ruby for a :stupid:
Was This Post Helpful? 0
  • +
  • -

#4 xclite  Icon User is offline

  • LIKE A BOSS
  • member icon


Reputation: 915
  • View blog
  • Posts: 3,193
  • Joined: 12-May 09

Re: Question for using Ruby in Game development.

Posted 20 June 2012 - 12:14 PM

Ruby's pretty simple to learn - it might be worth becoming more familiar with the command line.

For the most part, to use one of those libraries:
gem install gosu



Then in the .rb file:
require 'rubygems' #not always necessary depending on version
require 'gosu'

#actual game logic


Was This Post Helpful? 0
  • +
  • -

#5 pvt_jaime  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 20
  • Joined: 27-May 12

Re: Question for using Ruby in Game development.

Posted 20 June 2012 - 01:38 PM

View Postxclite, on 20 June 2012 - 12:14 PM, said:

Ruby's pretty simple to learn - it might be worth becoming more familiar with the command line.

For the most part, to use one of those libraries:
gem install gosu



Then in the .rb file:
require 'rubygems' #not always necessary depending on version
require 'gosu'

#actual game logic


Yes ruby is very simple to learn. I took the "15 Minuts to learn Ruby" and got the basics of what it is but i need to figure out more details about them. The
require 'rubygems' #not always necessary depending on version
require 'gosu'

#actual game logic


I already know to include that for a rb project file. Ill try to see if my system wont screw up with installing Gosu since it just stopped working while downloading a IDE for ruby. Aptanta :P
Was This Post Helpful? 0
  • +
  • -

#6 pvt_jaime  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 20
  • Joined: 27-May 12

Re: Question for using Ruby in Game development.

Posted 20 June 2012 - 01:45 PM

Hmm I tried to install gosu and i just get a
jaime@ubuntu:~$ gem install gosu
Fetching: gosu-0.7.43.gem (100%)
ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied - /var/lib/gems


I might be doing the command wrong i think. I tried
jaime@ubuntu:~$ sudo gem install gosy 
ERROR:  Could not find a valid gem 'gosy' (>= 0) in any repository
ERROR:  Possible alternatives: gosh, gosu, nosy, rosy
jaime@ubuntu:~$ sudo gem install gosu 
Fetching: gosu-0.7.43.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing gosu:
	ERROR: Failed to build gem native extension.


And just get another error ._. . I might be doing something wrong or its the server the files are located at?
Was This Post Helpful? 1
  • +
  • -

#7 xclite  Icon User is offline

  • LIKE A BOSS
  • member icon


Reputation: 915
  • View blog
  • Posts: 3,193
  • Joined: 12-May 09

Re: Question for using Ruby in Game development.

Posted 20 June 2012 - 04:43 PM

You had the right idea - this is one I turned to google with when I first encountered it. To build gems that have native extensions (any gaming gem probably has this) you need some development libraries.

Check out the gem install lists at the top here:
https://github.com/j...tarted-on-Linux

I'm actually a fan of how well documented this is, so I may have to give Gosu a try in the future.


Edit: Also I wanted to point out that using sudo to install gems on Ubuntu is generally required (I've never had it work without sudo), so that was the correct path.

This post has been edited by xclite: 20 June 2012 - 04:45 PM

Was This Post Helpful? 1
  • +
  • -

#8 pvt_jaime  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 20
  • Joined: 27-May 12

Re: Question for using Ruby in Game development.

Posted 20 June 2012 - 05:01 PM

View Postxclite, on 20 June 2012 - 04:43 PM, said:

You had the right idea - this is one I turned to google with when I first encountered it. To build gems that have native extensions (any gaming gem probably has this) you need some development libraries.

Check out the gem install lists at the top here:
https://github.com/j...tarted-on-Linux

I'm actually a fan of how well documented this is, so I may have to give Gosu a try in the future.


Edit: Also I wanted to point out that using sudo to install gems on Ubuntu is generally required (I've never had it work without sudo), so that was the correct path.

The link has pretty good instructions on adding the libareis. I finally got it to work, Im just waiting on the downloading part from terminal. From the looks of it it has alot of files to install that are for the core, And it tells you what to do first. The video i saw for installing this didnt show this first. Thanks.
Was This Post Helpful? 1
  • +
  • -

#9 xclite  Icon User is offline

  • LIKE A BOSS
  • member icon


Reputation: 915
  • View blog
  • Posts: 3,193
  • Joined: 12-May 09

Re: Question for using Ruby in Game development.

Posted 20 June 2012 - 05:16 PM

Good luck! Glad to hear it worked out.
Was This Post Helpful? 0
  • +
  • -

#10 pvt_jaime  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 20
  • Joined: 27-May 12

Re: Question for using Ruby in Game development.

Posted 20 June 2012 - 05:39 PM

Ill just need to read the documents for Gosu to see how i can use it. And get a better understanding of Ruby to make some console games first. Then try something bigger.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1