Not logged inGosu Forums
Forum back to Help Search Register Login
Up Topic Gosu / Gosu News / Gosu 0.7.35 released
- - By jlnr (dev) Date 2011-08-11 23:01
Oh well,

I actually wanted to be working on Gosu 0.8 for a number of months now, but sadly 0.7.x needed another round of fixing to keep things going.

• Mac/Ruby: Rebuilt the Mac .app to support 10.4+ (three-way universal)
• Linux: Changed audio backend to OpenAL/libsndfile (thanks again to Jamer)
• Linux: Redraw the window on window damage (thanks Jamer)
• Windows: Changed audio backend to OpenAL/libsndfile
• C++: Removed dependency on boost (uses TR1/C++03 instead) (thanks to tuiq for a hotfix here)
• C++: Changed signature of loadImageFile to reduce heap bloat
• Windows: Added a Makefile for MinGW (thanks Jamer & Seisatsu)

So now, the audio is backed by OpenAL on all platforms. Sadly, there is one remaining crash on exit on Windows with Ruby when you use music.

Maybe I can even fix that last bit until the next weekend. Reminder: There's a huge Ludum Dare competition coming up!!

Note that for C++, boost is still listed as a dependency on a number of wiki pages. This is okay because the Tutorial game still uses boost, and I think I will clean it up after the 0.8 syntax warrants a rewrite of all examples.

Happy hacking and bug filing.
Parent - - By erisdiscord Date 2011-08-12 03:30
Speaking of—does Gosu work with MacRuby yet, or do you know? It would make things easier if we could just create a MacRuby application with Xcode.

(For that matter, a Cocoa version of Gosu would be wonderful, but I'm not holding my breath :D)
Parent - - By jlnr (dev) Date 2011-08-12 09:30
I don't actively maintain support for MacRuby and Rubinius, but with .33 or .34, I had verified that Tutorial.rb would work with both of them. You just have to "gem install gosu --platform=ruby" even on OS X to get the source gem.

I even had a Cocoa wrapper around Gosu once, but it didn't make things easier at all and was a pain to maintain. It is unclear to me whether MacRuby has a great future ahead of it or not. Apple's recent "replacement" of GC by clang's ARC sounded like alarm bells... :(
Parent - By erisdiscord Date 2011-08-12 15:19
Huh, I hadn't even thought of the implications of ARC for MacRuby. I like ARC because it's less invasive than garbage collection, but it would be hard to retrofit that into Ruby while maintaining C extension compatibility, which seems to be a goal of the project. It doesn't seem like the garbage collector is going away, though.
Parent - - By parananon Date 2011-08-14 00:40
Would you mind uploading the tutorial.rb mac code (if you still have it) so I could take a look at it?

Parent - By jlnr (dev) Date 2011-08-14 13:12
Just the Tutorial.rb code that comes with Ruby. I just ran "macruby Tutorial.rb" and it worked :)
Parent - - By Basic Date 2011-08-12 08:04
Has boost been causing problems in terms of new users?
Parent - By jlnr (dev) Date 2011-08-12 09:32
No, and real C++ games will always use boost anyway I guess. It was a bit annoying that installing the Gosu gem from source relied on boost being present on the system though. See above posting - someone on OS X who wants to install Ruby/Gosu from source for an exotic Ruby platform doesn't need *any* external libraries now. :)
Parent - By TheOm3ga Date 2011-08-17 01:24
OMG a Makefile for MinGW, that sounds hot! Will check it out asap, I hope I can get rid of Visual Studio for once.
Parent - By jlnr (dev) Date 2011-08-17 11:18
As a hotfix, if you need an OpenAL32.dll that neither crashes nor hangs at exit, try the attached one.
Attachment: OpenAL32.dll (185k)
Parent - By Basic Date 2011-08-17 13:16 Edited 2011-08-17 15:52
Couple of things I've noticed.

- Audio requires dll exists in the directory even if audio isn't used.
- Also Visual Studio 2008 (or at least my VS) doesn't come with TR1 by default, it is a separate install. Also the install defines _HAS_TR1 if you wanted to check for it.
Parent - - By TheOm3ga Date 2011-08-19 11:37
I've found a little weird warning that's bugging me quite a lot. Whenever I compile a project I get this warning for every single file:

In file included from gosu/Gosu/Gosu.hpp:13,
                 from test.cpp:1:
gosu/Gosu/Fwd.hpp:10: warning: attribute ignored in declaration of ‘struct Gosu::Audio’
gosu/Gosu/Fwd.hpp:10: warning: attribute for ‘struct Gosu::Audio’ must follow the ‘struct’ keyword

Content of test.cpp is just

#include <Gosu/Gosu.hpp>

int main(){
  return 0;

Any clue?
Parent - - By TheOm3ga Date 2011-08-19 11:54 Edited 2011-08-19 12:32
Looks like adding -DSWIG to the compilation options fixes it.

Edit: no, it does not work. Indeed it fixes the audio warning, but breaks other things :(
Parent - - By erisdiscord Date 2011-08-19 21:42 Edited 2011-08-19 21:52
Nope. The SWIG macro is there as a way to tell SWIG to ignore certain parts of the C++ headers that shouldn't be included in the Ruby bindings.

The warning is complaining about the placement of an attribute on a forward declaration. Strangely, the contents of Gosu/Fwd.hpp specify nothing of the sort.

//! \file Fwd.hpp
//! Contains declarations of all of Gosu's available classes.

#ifndef GOSU_FWD_HPP
#define GOSU_FWD_HPP

//! The library's main namespace.
namespace Gosu
    class Audio; // <- this is line 10
    class Bitmap;
    class Buffer;
    class Button;

Parent - By jlnr (dev) Date 2011-08-20 03:01
Maybe it's the fact that in Audio.hpp, it is declared as GOSU_DEPRECATED but not so in Fwd.hpp. I'll try to make it consistent and see if it changes anything.
Parent - - By RavensKrag Date 2011-08-19 20:30 Edited 2011-08-19 22:27
Getting this error occasionally.

X Error of failed request:  BadDamage (invalid Damage parameter)
  Major opcode of failed request:  153 (DAMAGE)
  Minor opcode of failed request:  3 (XDamageSubtract)
  Serial number of failed request:  253
  Current serial number in output stream:  255

On Ubuntu Linux 11.04 Natty Narwhal
Parent - - By Jamer Date 2011-08-20 14:24
RavensKrag, do you use threads in your program? Also, does the error occur while your game is running, or does it happen on exit?
Parent - By RavensKrag Date 2011-08-20 16:54
No threads, and it happens while the game is running.   Also, I'm using the latest ruby gem.

Strangely, it only happens in my level editor, and not in the game proper, even though I'm pretty sure the rendering logic is the same.  I'm getting other issues as well, like things not loading correctly, so it might just be me.  However, I don't think I got this issue with the other versions of gosu, and I heard that recently there was a modification which dealt with window damage in X.

...just tested it again and I can't reproduce the error =/
Sorry about that.  Just ignore this problem for now, and I'll post again if I can isolate the issue.
Up Topic Gosu / Gosu News / Gosu 0.7.35 released

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill