Page 1 of 2

Rubygame 2.6 feedback

PostPosted: Wed Oct 21, 2009 12:59 am
by jacius
Please post about your experiences with Rubygame 2.6 (and the 2.6 test release) here!

Please be sure to mention what operating system, Ruby version, and what versions of SDL (and SDL_image, SDL_gfx, etc.) you have.

Re: Rubygame 2.6 test release feedback

PostPosted: Wed Oct 21, 2009 3:58 am
by shawn42
Installed nice-ffi 0.2
Installed ruby-sdl-ffi 0.1
Installed rubygame-2.6 (downloaded from blog post)

It's not recognizing SDL_gfx. I may have a strange setup though. Is there anything I need to do to tell ruby-sdl-ffi or ffi where to look for my libs? Where does it look by default?

Error from Gamebox:
http://gist.github.com/214857

Re: Rubygame 2.6 test release feedback

PostPosted: Wed Oct 21, 2009 4:06 am
by jacius
shawn42 wrote:It's not recognizing SDL_gfx. I may have a strange setup though. Is there anything I need to do to tell ruby-sdl-ffi or ffi where to look for my libs? Where does it look by default?

By default, it looks in:
  • Linux:
    • /usr/lib/
    • /usr/local/lib/
  • Mac:
    • /usr/local/lib/
    • /sw/lib/
    • /opt/local/lib/
    • ~/Library/Frameworks/
    • /Library/Frameworks/
  • Windows:
    • C:\windows\system32\
    • C:\windows\system\

It looks for *.so files on Linux, *.dylib and Frameworks on Mac, and *.dll on Windows.

I haven't made a way for users to indicate where the libraries are installed, but I'm considering it. It's possible for an application to tell it extra places to look, check out the Custom SDL Load Paths instructions.

Re: Rubygame 2.6 test release feedback

PostPosted: Wed Oct 21, 2009 5:41 am
by tyler
SDL_gfx isn't loading on my machine either (32bit Ubuntu Jaunty), it's installed via the package manager and I haven't messed with it at all...

The actual error I get:
Code: Select all
"Function 'SDL_gfxBlitRGBA' not found in [/usr/lib/libSDL_gfx.so]"


Everything else appears to load without error.

Re: Rubygame 2.6 test release feedback

PostPosted: Wed Oct 21, 2009 3:43 pm
by jacius
tyler wrote:
Code: Select all
"Function 'SDL_gfxBlitRGBA' not found in [/usr/lib/libSDL_gfx.so]"

Woops. I'm guessing from that message that your SDL_gfx is older than 2.0.16. Which is fine, because Rubygame is supposed to work with that still. Looks like I'll need to program it to rescue when certain functions aren't available.

Thanks for the report!

Re: Rubygame 2.6 test release feedback

PostPosted: Wed Oct 21, 2009 6:59 pm
by jacius
Update for Intel Mac users: I've made a package of dylibs for SDL and related libraries. You can unpack this into /usr/local/lib/, and Rubygame will find and use the libraries.

http://jacius.info/files/2009/10/21/SDL-mac-dylibs.tar.bz2

Included libraries:
* SDL-1.2.14
* SDL_gfx-2.0.19
* SDL_image-1.2.8
* SDL_mixer-1.2.9
* SDL_ttf-2.0.9
* smpeg r389
* freetype-2.3.9

Re: Rubygame 2.6 test release feedback

PostPosted: Wed Oct 21, 2009 7:35 pm
by shawn42
With your SDL_gfx.dylib, seems to work for me!

Function 'SDL_GetKeyState' not found in [/opt/local/lib/libS

PostPosted: Thu Oct 22, 2009 4:41 am
by jm3
running ruby 1.8.7 on OS X 10.6.1 with SDL-1.2.14 (pre-release), SDL_mixer-1.2.8 (also pre-release).

after installing the 3 new rubygame 2.6 gems, in order, and then re-running my code, i get the following stack trace when ruby hits the line,

require 'rubygame'

Code: Select all
/opt/local/lib/ruby/gems/1.8/gems/ffi-0.5.1/lib/ffi/library.rb:77:in `attach_function': Function 'SDL_GetKeyState' not found in [/opt/local/lib/libSDL.dylib] (FFI::NotFoundError)
        from /opt/local/lib/ruby/gems/1.8/gems/nice-ffi-0.2/lib/nice-ffi/library.rb:122:in `func'
        from /opt/local/lib/ruby/gems/1.8/gems/ruby-sdl-ffi-0.1/lib/ruby-sdl-ffi/sdl/keyboard.rb:56
        from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        ....


gems:
Code: Select all
ffi (0.5.1)
gem_plugin (0.2.3)
gemcutter (0.1.6, 0.1.5)
nice-ffi (0.2)
ruby-sdl-ffi (0.1)
rubygame (2.6.0)
rubygems-update (1.3.5)


i also tried it with the dylibs linked below, with the same result.

Re: Function 'SDL_GetKeyState' not found in [/opt/local/lib/libS

PostPosted: Thu Oct 22, 2009 7:35 pm
by jacius
jm3 wrote:
Code: Select all
/opt/local/lib/ruby/gems/1.8/gems/ffi-0.5.1/lib/ffi/library.rb:77:in `attach_function': Function 'SDL_GetKeyState' not found in [/opt/local/lib/libSDL.dylib] (FFI::NotFoundError)

This is very strange. SDL_GetKeyState is not a new function, it has been in SDL for a long time, and is definitely in SDL 1.2.14. I've even checked manually and confirmed it's compiled into the libSDL.dylib in the pack I uploaded. So I have no idea what's wrong there, sorry. :|

Re: Rubygame 2.6 test release feedback

PostPosted: Thu Oct 22, 2009 7:59 pm
by jm3
I had rubygame previously installed, built from source because of the rakefile bug i contacted you about. maybe there is a conflict between that version and the new one, somehow.

Jacius, what's the best way to make sure that the old versions of rubygame are completely uninstalled?