Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / Ruby 2.0?
- - By erikskoglund Date 2013-02-18 13:21
Hi, will there be any support for gosu with Ruby 2.0?
Parent - - By jlnr (dev) Date 2013-02-19 05:46
Which platform are you on? For development: Does the current gem not work with 2.0?

For Mac packaging, this is how it works- every N months I manage to build a new RubyGosu.app (the process of which is very complicated and requires at least two computers). When this happens, I usually embed the latest available stable version of Ruby. So the next time I update the .app, it should contain Ruby 2.0.
Parent - - By erikskoglund Date 2013-02-19 07:48
I'm on osx. I tried without any luck. Can't even require gosu, I just get the error

TypeError: wrong argument type nil (expected Data)

This is with ruby-2.0.0-rc1
No rush though, just curious to see how the new garbage collector handles in my game.
Thank you for the answer!
Parent - By jlnr (dev) Date 2013-02-19 14:47
If you are on OS X, you can try installing this preview gem directly (download it and then gem install <filename>):

https://dl.dropbox.com/u/9219/gosu-0.7.46.gem

This one is a source gem that works on both OS X and Linux, the "normal" gem you get from gem install gosu is precompiled for 1.8 and 1.9. Maybe the binary API has changed between 1.9 and 2.0, just like it did between 1.8 and 1.9.
Parent - By uncanny Date 2013-03-01 22:30
If you use gosu-0.7.45 installed from source instead of gosu-0.7.45-universal-darwin it should work.
Parent - - By pete_mw Date 2013-02-24 19:54 Edited 2013-02-26 21:40
According to the 2.0 release announcement, there are ABI breakages, so any binary extensions will have to be recompiled, which includes Gosu.

And I don't know if Gosu will get 64-bit support right away.

EDIT 2: On Windows at least, it looks like it's going to take a while for 2.0 to be particularly useful anyway. A lot of useful binary gems seem to be in the same boat as Gosu -- while the developers of those gems can build them, the people using them often can't, even with the appropriate development tools installed.
Parent - - By jlnr (dev) Date 2013-03-03 02:29
Agree with Edit 2. The next Gosu release will definitely not support Ruby 2.0 on Windows. I don't think that's a big loss - immediate Floats are the biggest gain for Gosu, and they only work on 64-bit, which I can't just support overnight. And I'm not even sure if ocra supports Ruby 2.0 yet, which is a must (IMHO).

Here's the ticket for Gosu on Ruby 2.0 on Windows: https://github.com/jlnr/gosu/issues/163

If the next Gosu release works with Rubygems 2.0 on Ruby 1.9, I'm more than happy with that :)
Parent - - By pete_mw Date 2013-03-03 13:47
It might be interesting to see if a pure-Ruby version of Gosu could be done -- it certainly looks like a fresh install of Ruby on Windows should come with everything you'd need to implement the classic Gosu interface, and somebody's managed a successful pure-Python OpenGL framework, so I don't think performance would necessarily be an issue.
Parent - - By jlnr (dev) Date 2013-03-03 14:51
It would :) Gosu does a lot of heavy looping to do the Z ordering, for example. And we'd need to find libraries for everything that Gosu bundles (windowing, audio...), a lot of which probably have the same distribution problems as Gosu has.
Parent - - By pete_mw Date 2013-03-03 15:38 Edited 2013-03-03 15:44
I'm mainly thinking of how Pyglet and the original Cocos2D worked, which basically boils down to using native stuff provided by the platform wherever you can -- every Ruby implementation on Windows is bundled with the relevant libraries for the Windows API and COM, which I think should be enough to open new windows and play around with Direct2D and WIC.

Pyglet appears to support Z-ordering, although I'm not sure how they pulled that off.
Parent - By jlnr (dev) Date 2013-03-04 23:17
It can see the appeal of it, but I doubt it would save work in the long run. Especially as the Linux and Mac gems work okay-ish, except for the Mac pre-compiled gem that I've shipped until now.

I would guess that Pyglet uses the Z-ordering in OpenGL, which is fine for 3D games, but was not really built for 2D games with lots of transparent textures.

And because Gosu does not use OpenGL's Z ordering, the transformation implementations (scale{} etc) also have to do some more work on the C++ side... :)
- By uncanny Date 2013-03-01 21:47
gosu works for me on Ruby 2.0 on the Mac. I use homebrew to install ruby. I just needed to brew install libogg libvorbis then gem install gosu.
Up Topic Gosu / Gosu Exchange / Ruby 2.0?

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill