I looked at similar options recently while prototyping a custom embedded GUI we're working on. So this isn't strictly games related, but there's some overlap in the 2D drawing and handling input aspects. This started out in C, but that quickly became frustrating :).

I ended up using the Allegro library (a games programming library somewhat similar to SDL). There's a Perl module with bindings and an OO wrapper to the API that I found here. It doesn't appear to be on CPAN, but the tarball installed fine with "perl Makefile.PL; make; make install". It does require the Allegro library (which is a one command install in Debian).

This filled my needs very well for just doing mostly loading images and drawing various rectangles and text about the screen. I didn't even try most of the API, so I'm not sure about how well it covers those parts. It certainly doesn't cover the full Allegro API, but that wasn't a problem for me in this case. There don't seem to be many people using this, so that may be a factor. The docs were kind of geared towards someone who's used Allegro before, but most things are simple enough that it shouldn't really matter.

-- Rob


In reply to Re: 2D realtime pixel graphics options in Perl by Anonymous Monk
in thread 2D realtime pixel graphics options in Perl by flyingmoose

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.