Page 2 of 2

Re: Rubygame 2.6 test release feedback

PostPosted: Fri Oct 23, 2009 1:00 am
by jacius
jm3 wrote: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?

I'm fairly certain that your issue isn't a conflict with an older Rubygame. But, it couldn't hurt to remove old versions. A simple way to find installed Rubygame files in with the 'find' command:

Code: Select all
find /usr/lib/ /usr/local/lib/ /opt/lib/ -name "*rubygame*"

Re: Rubygame 2.6 test release feedback

PostPosted: Sun Oct 25, 2009 12:51 am
by jacius
[url]Rubygame 2.6.0 has now been released[/url]. You should be able to install it with "gem install rubygame".

The final version (as compared to the test release) fixes JRuby support and should work better with old SDL_gfx versions, fixes a bug in Surface#blit, and has improved documentation.

Re: Rubygame 2.6 test release feedback

PostPosted: Sun Oct 25, 2009 11:35 pm
by tyler
should work better with old SDL_gfx


Not quite (at least for my version) arcRGBA should be an optfunc (ruby-sdl-ffi-0.1/lib/ruby-sdl-ffi/gfx/primitives.rb line 103), besides that it works now! Thanks!

Re: Rubygame 2.6 test release feedback

PostPosted: Mon Oct 26, 2009 4:46 am
by axgle
on ubuntu:sudo aptitude install libsdl-gfx1.2-dev
Code: Select all
./demo_rubygame.rb
Warning: Function 'SDL_gfxBlitRGBA' not found in [/usr/lib/libSDL_gfx.so]
Warning: Function 'SDL_gfxSetAlpha' not found in [/usr/lib/libSDL_gfx.so]
Warning: Function 'arcColor' not found in [/usr/lib/libSDL_gfx.so]
Warning: Could not load SDL_gfx! Continuing anyway, but some Surface methods will be missing.
Error message was: "Function 'arcRGBA' not found in [/usr/lib/libSDL_gfx.so]"
./demo_rubygame.rb:55: This demo requires Surface rotozoom and zoom support (SDL_gfx) (RuntimeError)

Re: Rubygame 2.6 test release feedback

PostPosted: Mon Oct 26, 2009 6:12 pm
by jacius
tyler wrote:Not quite (at least for my version) arcRGBA should be an optfunc (ruby-sdl-ffi-0.1/lib/ruby-sdl-ffi/gfx/primitives.rb line 103)

Phooey. I'll try to fix that up soon.

Re: Rubygame 2.6 test release feedback

PostPosted: Mon Oct 26, 2009 11:14 pm
by DaveJones
I have installed the latest RubyGame from the gem method above. In addition I downloaded your tarball and put those files in my usr/local/lib directory.
ruby v1.8.6
rubygame v2.6.0
Mac OS X 10.5.8

However, when I try to run a simple game that I got from an online tutorial, I get a bunch of errors like:
Code: Select all
2009-10-26 16:06:26.171 ruby[13236:10b] *** _NSAutoreleaseNoPool(): Object 0x40ea10 of class NSCFNumber autoreleased with no pool in place - just leaking
Stack: (0x93529f4f 0x93436432 0x91ae8cad 0x90d4b8b8 0x90d4a239 0x90d5a6d6 0x91b4511b 0x91b43321 0x91b43066 0x91b42a15 0x91b42554 0x91b40550 0x653fde 0x649f7b 0x61e270 0x61e2a7 0x1d65c9 0x1d92cc 0x1df655 0xd7023 0xe01cc 0xe0da7 0xde108 0xddca6 0xdca33 0xe099f 0xe0da7 0xde108 0xec763 0xecdc1 0xe01cc 0xe0da7 0xde108 0xdd625 0xe099f 0xe0da7 0xde108 0xed0a1 0xed0d2 0xed0fe)
2009-10-26 16:06:26.173 ruby[13236:10b] *** _NSAutoreleaseNoPool(): Object 0x4e9b10 of class NSCFNumber autoreleased with no pool in place - just leaking
Stack: (0x93529f4f 0x93436432 0x91ae8ce5 0x90d4b8b8 0x90d4a239 0x90d5a6d6 0x91b4511b 0x91b43321 0x91b43066 0x91b42a15 0x91b42554 0x91b40550 0x653fde 0x649f7b 0x61e270 0x61e2a7 0x1d65c9 0x1d92cc 0x1df655 0xd7023 0xe01cc 0xe0da7 0xde108 0xddca6 0xdca33 0xe099f 0xe0da7 0xde108 0xec763 0xecdc1 0xe01cc 0xe0da7 0xde108 0xdd625 0xe099f 0xe0da7 0xde108 0xed0a1 0xed0d2 0xed0fe)
2009-10-26 16:06:26.173 ruby[13236:10b] *** _NSAutoreleaseNoPool(): Object 0x100e3d0 of class NSCFNumber autoreleased with no pool in place - just leaking
Stack: (0x93529f4f 0x93436432 0x91ae8d1f 0x90d4b8b8 0x90d4a239 0x90d5a6d6 0x91b4511b 0x91b43321 0x91b43066 0x91b42a15 0x91b42554 0x91b40550 0x653fde 0x649f7b 0x61e270 0x61e2a7 0x1d65c9 0x1d92cc 0x1df655 0xd7023 0xe01cc 0xe0da7 0xde108 0xddca6 0xdca33 0xe099f 0xe0da7 0xde108 0xec763 0xecdc1 0xe01cc 0xe0da7 0xde108 0xdd625 0xe099f 0xe0da7 0xde108 0xed0a1 0xed0d2 0xed0fe)


The source of the game is:
Code: Select all
#!/usr/bin/env ruby

require 'rubygems'
require 'rubygame'

Rubygame.init

screen = Rubygame::Screen.set_mode [320,240]
screen.title = 'Hello World'
screen.fill [0,0,255]
screen.update

queue = Rubygame::EventQueue.new

game_over = false

until game_over do
  queue.each do |event|
    case event
      when Rubygame::ActiveEvent
        screen.update
      when Rubygame::QuitEvent
        game_over = true
    end
  end
end

Rubygame.quit

########

Any suggestions?
Thanks,

Re: Rubygame 2.6 test release feedback

PostPosted: Tue Oct 27, 2009 12:26 am
by DaveJones
I believe I solved my own problem by finding another post about rsdl. I installed rsdl and can now run the ruby game by typing rsdl game.rb

Thanks!

Re: Rubygame 2.6 test release feedback

PostPosted: Tue Oct 26, 2010 5:28 am
by jimm1909
DaveJones wrote:I believe I solved my own problem by finding another post about rsdl. I installed rsdl and can now run the ruby game by typing rsdl game.rb 8x8 Reviews

Thanks!


Do you mind elaborating on how you solved your problem? I'm having a very similar issue it seems.

Thanks in advance,

-Jim

Re: Rubygame 2.6 feedback

PostPosted: Thu Jan 20, 2011 5:48 pm
by kzar
I got that same error JM3, here's what fixed it for me:
Code: Select all
sudo port uninstall libsdl-devel
sudo port install libsdl
sudo port selfupdate
sudo port upgrade outdated


I just signed up to post this because it catches me out every time.

Cheers, Dave.

Edit: I had to gem uninstall and gem install rsdl again after that.

Edit2: I had a lot of trouble getting it to load SDL_GFX too. Here's how I fixed it:
Code: Select all
sudo port uninstall libsdl_gfx libsdl_gfx-framework
(Deleted every copy of SDL_GFX from /Library/Frameworks and /usr/local/lib)
sudo port install libsdl_gfx-framework


(I've got no idea why any of this worked!)