Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: 2D realtime pixel graphics options in Perl

by Vautrin (Hermit)
on Feb 29, 2004 at 02:09 UTC ( #332581=note: print w/replies, xml ) Need Help??


in reply to 2D realtime pixel graphics options in Perl

Most games / graphical things are programmed in C / C++ for speed. This makes me think you might want to try rolling your own perl wrapper using Inline::C (or Inline::CPP) to create an API for whatever you need.

Want to support the EFF and FSF by buying cool stuff? Click here.
  • Comment on Re: 2D realtime pixel graphics options in Perl

Replies are listed 'Best First'.
Re: Re: 2D realtime pixel graphics options in Perl
by flyingmoose (Priest) on Feb 29, 2004 at 02:22 UTC
    Well, I've been here -- and this is exactly what the Perl bindings to Svgalib and a few other libraries above do. The idea is to avoid reinventing those wheels, as those wheels should already exist. Technically I could just use GTK2 or Qt or something equally complex, but then one spends a ton of time learning the in's and out's of Qt. Really, I'd just like to scrible on the screen as quickly as possible with a minimum of overhead. Over the years this has been QBasic and Pascal graphics modes, Mode13h from C, DOS Allegro, and of course OpenGL, etc.

    If I have to write yet-another-game-programming-library in Perl, I may do that...but I don't want to compete with SDL, per se, since that seems to be the way a lot of languages are going (not just Perl). Still, I'd like to see some higher level 2D drawing constructs built on top of SDL... available in some modules that are a little better organized than what we have today. Something that could effectively provide drawing primatives versus the blit-oriented stuff we have today.

    Dunno. Wheel reinvention is in my future. I feel it. That's not good.

      As I understand your problem, you can't find a graphics library that meets your needs. And the reasons for this are that either they aren't cross platform compatible, or don't have the features you need, right? Well, in that case you're either going to need to a) create your own graphics library for the functions you need or b) modify a freely available one.

      Want to support the EFF and FSF by buying cool stuff? Click here.
Re: Re: 2D realtime pixel graphics options in Perl
by exussum0 (Vicar) on Feb 29, 2004 at 03:10 UTC
    It depends on the game. Some games, like solataire do not require 30+fps on a full screen. If done with double buffering, it could rock with no ill effects.


    I used to be a funny character, now I'm just 4 bits.
      Exactly. Rocking a la Atari 2600 (or say, 8-bit Megaman II) is all that is needed to have fun in my book. Kids these days want too much flashy stuff. Graphics sells, gameplay doesn't...or so it seems...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://332581]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2022-05-28 07:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (98 votes). Check out past polls.

    Notices?