PDA

View Full Version : Ruby-SDL on Linux - Specifically Fedora Core 4


rob
February 3rd, 2006, 12:57 AM
I've installed Ruby SDL on my Fedora Core 4 install and all seems to be well with it, but our Nebular Gauntlet game isn't executing well. It dies after hitting Enter on Start in the menu, with this:

[robert@cloud trunk]$ ruby game.rb
Nebular Gauntlet Pre Alpha
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This program is licensed under the GPL
Graphics mode and drawing surface established.

Loading Config....
Loading Images....
Loading Fonts....
Creating Arrays....
Creating Variables....

Further messages, unless critical, will be found in the game console.

Press TAB to access the console.
./ship.rb:29:in `draw': undefined method `transformBlit' for SDL:Module (NoMethodError)
from game.rb:731:in `join'
from game.rb:731
from game.rb:731

I'm writing a guide on how to install RubySDL on Fedora and almost done, but I'd like to find out if my ruby-sdl install is causing the above problem, and see if anyone else has run across it.

I'll go ahead and post what I've done so far here:

yum install SDL_ttf-devel SDL_ttf freetype freetype-devel SDL SDL-devel smpeg smpeg-devel SDL_gfx SDL_image SDL_mixer SDL_image-devel SDL_gfx-devel SDL_mixer-devel SDL_net SDL_net-devel
cd /usr/src
wget http://www.kmc.gr.jp/~ohai/rubysdl/rubysdl-1.0.0.tar.gz
tar xfz rubysdl-1.0.0.tar.gz
cd rubysdl-1.0.0
ruby extconf.rb
make install

Anyone have any ideas?

steve_d555
February 3rd, 2006, 01:04 PM
Ruby/SDL's draw functions all depend on SGE which can be gotten from: http://www.etek.chalmers.se/~e8cal1/sge/

There is a bug in SGE, however which can be fixed by using http://rubyforge.org/tracker/download.php/1006/3942/3251/449/sge.diff
(I'm going to talk to the developer to try and get it merged upstream)

There doesn't seem to be anything about SGE RPMs so you are out of luck using Yum.

rob
February 4th, 2006, 02:48 AM
I am having trouble getting it (SGE) to compile cleanly on Fedora 4 x86_64. I was going to make an RPM for it but unfortunately no matter what I do I can't get a successful build. I will get it working somehow though :)

steve_d555
February 4th, 2006, 04:07 PM
Is it a problem with Freetype?
Some of the includes are wrong so the build fails, you can get the patch from Gentoo's bugzille:
http://bugs.gentoo.org/attachment.cgi?id=51584&action=view

rob
February 8th, 2006, 12:54 AM
I got it to work. Installing libstdc++-devel cleared up the problem. After applying the patch and diff it's running.

I'm going to make an RPM when I get a spare sec, but ideally, I'd like to see this bug fixed upstream before I make one. This seems like a brittle package.

rob
February 8th, 2006, 12:57 AM
Hmm.. I got a clean install of SGE, but I still get:

./ship.rb:29:in `draw': undefined method `transformBlit' for SDL:Module (NoMethodError)
from game.rb:731:in `join'
from game.rb:731
from game.rb:731

Any further ideas? I'm out of them :(

steve_d555
February 8th, 2006, 11:02 AM
You may have to re-compile Ruby/SDL because it probably didn't detect it at first and didn't compile support. That should clear up problems with those. SGE is definitely a fairly old package (last release was 2003), but I did contact the author a couple months ago for a Mac OS X fix so he is still around.

steve_d555
February 15th, 2006, 03:30 PM
Just wondering if you were able to get an SGE RPM working on Fedora?


I am still waiting for a reply on the CMap fix, but hopefully he will respond soon.

rob
February 15th, 2006, 04:24 PM
I wasn't able to get it to compile cleanly. Very frustrating, I can usually get anything to compile without errors :)