Gosu 0.7.4

Hi,

I am happy to announce the release of Gosu 0.7.4, which is already
available via ‘gem install gosu’ on Mac OS X and Windows, including
the CptnRuby sample game previously not bundled with the gem.
Information, documentation, non-gem-downloads and a source release
for Linux can be found on:

http://code.google.com/p/gosu/

Gosu is a 2D game development library designed from the ground up
around 3D accelerated hardware, yet also provides classes for sound
effects, music as well as keyboard, mouse and gamepad input. The
library goes to great lengths to abstract recurring annoyances away
and to hide them behind clean, object-oriented interfaces.

The library has steadily evolved since its inception (2001), and has
been referenced on this list for a few times. However, this is the
first official announcement, so feedback is of course more than
appreciated.

Gosu 0.7.4 fixes the following bugs:

  • Exceptions can’t terminate Ruby anymore (SWIG wrapping oversight in
    0.7.3)
  • Improved support for some gamepads on OS X.

Julian

On Aug 15, 11:37 am, Julian R. [email protected] wrote:

Gosu is a 2D game development library designed from the ground up
Gosu 0.7.4 fixes the following bugs:

  • Exceptions can’t terminate Ruby anymore (SWIG wrapping oversight in
    0.7.3)
  • Improved support for some gamepads on OS X.

Julian

Great news. Andrea Wright gave an excellent talk on Gosu (and other
libraries) at the Ruby Hoedown in Raleigh this weekend. I had never
heard of it before then. Very exciting!

The link to the fmod DLL on
Google Code Archive - Long-term storage for Google Code Project Hosting. seems to be
broken. This is the link:

http://www.fmod.org/files/fmodapi375win.zip

Also:

C:\ruby\lib\ruby\gems\1.8\gems\gosu-0.7.4-mswin32\examples>ruby
CptnRuby.rb
CptnRuby.rb:36: Gem is not a class (TypeError)

C:\ruby\lib\ruby\gems\1.8\gems\gosu-0.7.4-mswin32\examples>echo
%RUBYOPT%
-rubygems -r/local

I installed gosu as a gem, and gems work otherwise in my Windows OCI
ruby installation. Am I doing something wrong, other than not having
fmod installed yet?

On Aug 15, 5:51 pm, “Martin DeMello” [email protected] wrote:

Did the crashing under linux ever get fixed? I really liked the
library, but was forced to abandon it due to that.

I don’t think the bug was fully tracked down back then, but I think it
was specific to the Ruby port - and the whole Ruby wrapper was changed
from custom C to SWIG-generated code in the meantime. The actual Linux
implementation hasn’t changed much, except for a semi-done SDL_mixer
backend available as an alternative to FMOD.

If you could try out the latest source release and test it, that would
be very cool! It’s still a bit hard to predict if it will run on Linux
or not, as we have gotten the most varied feedback from there, and can
only test it on one or two setups.

Julian

Hi,

http://www.fmod.org/files/fmodapi375win.zip

thanks for pointing this out! The FMOD team sure had a bad timing for
a website redesign. I check if including fmod.dll in the gem is okay,
to avoid this annoying manual downloading.

C:\ruby\lib\ruby\gems\1.8\gems\gosu-0.7.4-mswin32\examples>ruby CptnRuby.rb
CptnRuby.rb:36: Gem is not a class (TypeError)

Whoops, name clash. As a hotfix, you can edit CptnRuby.rb and replace
every occurence of ‘Gem’ with ‘CollectibleGem’.

Sigh. I hoped it wouldn’t be so obvious how new the Gem package is. :slight_smile:

Thanks a lot for your bug reports!

Julian

Is the Boost library required for using Gosu in Ruby?
Or is that just extra stuff for developing in C++?

On 8/15/07, Julian R. [email protected] wrote:

If you could try out the latest source release and test it, that would
be very cool! It’s still a bit hard to predict if it will run on Linux
or not, as we have gotten the most varied feedback from there, and can
only test it on one or two setups.

Will test it on Gentoo and report back when I get a free moment.

martin

On 8/15/07, Julian R. [email protected] wrote:

The library has steadily evolved since its inception (2001), and has
been referenced on this list for a few times. However, this is the
first official announcement, so feedback is of course more than
appreciated.

Did the crashing under linux ever get fixed? I really liked the
library, but was forced to abandon it due to that.

martin

Hi,

Will test it on Gentoo and report back when I get a free moment.

I plan to release 0.7.5 soon to fix minor bugs and annoyances (esp.
with the packaging). If there is anything you’d need to have fixed on
Linux, just let me know during the next days. :slight_smile: Trying to track all
the little bugs down now.

Julian

On Aug 15, 2007, at 4:05 PM, Julian R. wrote:

Good to know.
Tested out the “hello world” demo on OS X after installing the gosu gem.
Worked like a charm.
I am curious, what is used internally to generate windows? Tk? wx? Qt?
It would be nice to see a deeper tutorial. Specifically, since GUI
stuff can be so different on an OS.
The window opened on OS X by the demo had only one item in the menu
bar at the top of the OS X desktop. That item was Ruby, and it was
clickable/highlightable, but no menu, no options.

Anyway, Gosu seems quite interesting and fun. Especially from Ruby
rather than C++

Is the Boost library required for using Gosu in Ruby?

If you are using Linux, Boost (along with the other libraries listed
on the GettingStartedOnLinux wiki page) is necessary to compile Gosu’s
C++ implementation, which is then wrapped for use with Ruby. On other
platforms, Gosu is all you need, except fmod.dll for sound on Windows.

Julian

Hi again,

The window opened on OS X by the demo had only one item in the menu
bar at the top of the OS X desktop. That item was Ruby, and it was
clickable/highlightable, but no menu, no options.

sorry, just double-checked: with the wrapper .app, there still won’t
be any menu items as I removed them from the code because they didn’t
work reliably. They will come back, and I changed the corresponding
ToDo point to explicitly mention this.

Julian

Hi,

I am curious, what is used internally to generate windows? Tk? wx? Qt?
It would be nice to see a deeper tutorial. Specifically, since GUI
stuff can be so different on an OS.

Gosu uses each system’s (sort-of) native API: Cocoa, Win32 or X11,
respectively. I am not afraid of dependencies, however getting the
higher-level libraries to work seamlessly on every OS would be harder
than it was to write the windowing code from scratch.

In Ruby/Gosu, only Gosu::Window is available and all its features are
already shown in the tutorial, except button_up. What will come are
basic features needed for in-game, non-native UI (facilities for text
input, maybe support for multiple windows). A toolkit for such in-game
UI will however never be part of Gosu, as it contains endless
complexity and many very personal design choices. It may be released
as an add-on library though, as a side-effect of other Gosu projects.

Also, if there were a de-facto standard Ruby GUI toolkit, I could be
convinced to write glue to integrate Gosu with it.

The window opened on OS X by the demo had only one item in the menu
bar at the top of the OS X desktop. That item was Ruby, and it was
clickable/highlightable, but no menu, no options.

This is because it is actually a bit hackish on OS X to have a command-
line program accept keyboard and mouse input, and the weird dock item
and menu bar are a side effect of this. Running Ruby scripts directly
is fine for development - for deployment the wrapper .app bundle from
the Mac package should be used, as it provides a real menu bar. (Some
more polish on this is planned).

Thanks for the kind feedback!

Julian