I use OpenGL::Simple. I've been very happy with it so far, although I haven't tried to do anything very complicated. (Although I mix it in with some pretty complicated OpenGL calls made directly from C++ code, and that works fine.)

I also am doing what you say doesn't work very well -- I have a large C++ application with an embedded perl interpreter, and I use both OpenGL::Simple and Inline::CPP (extensively) to provide the glue between perl and C/C++. And I use my own event loop. For the embedded interpreter, I just had to give up on any notion of modularity and allow it to use all of its global variables and related nastiness. The result seems to work fine. I don't make heavy use of callbacks, but I do use them.

That said, it's quite a big chunk to get working nicely together, and it's busywork that has little to do with the main part of writing a game. It would be nice to have a prefabricated framework with all these things mixed in. (I didn't mind doing it, because I was getting paid for it. And I was really just adding scripting to an existing framework. Can't release it as open source, sorry.)

I can't really address the OP's question. For sound, I use SDL_mixer, but I only call it from within C++. In practice, I often trigger sounds via perl scripts, but they're just manipulating a sound node written in C++, not directly triggering sound playing. Again, probably too much framework for a straightforward game. Although an Inline::C wrapper to call SDL_mixer functions would be pretty darn easy to write.

Inline::C is awesome. Just thought I should mention that.


In reply to Re^3: How can I make sounds in my Perl game scripts? by sfink
in thread How can I make sounds in my Perl game scripts? by apprentice

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.