I want to get into Perl game development, is Perl TK the best way to go about this? Not super complex games necissarily but games with real time graphics perhaps?

Well, first of all, you need to decide what the goals of your project are. For example, do you especially want to make games with graphics in perl because you want to learn more about how perl handles graphics? Or do you just want to make a cool game, by whatever means necessary? Do you want gameplay that's simple yet catchy, like tetris was, or something more complex and computationally expensive, like 3-D adventure games (Doom, Quake, etc.)

Once you know what you want, then you can decide if Perl::TK can do it.

Personally, I find Perl::Tk to be reasonably good to work with, but it certainly isn't the fastest graphics system out there. While I definately prefer programming in perl to programming in tcl, I think that Tcl/Tk was easier to learn than Perl::Tk would have been. However, Tcl/Tk is probably even slower than Perl::Tk is. Remember, Tk does a lot of work for you. Only you can decide whether all that overhead is worth it.

For most "real-time" games, I would not choose to use perl, let alone Perl::Tk. Games tend to be one of those rare kinds of programs where maximizing speed really does matter. Writing efficient code in C. or Assembly Language will allow you write a game that runs much faster than the same game written in perl. The down-side is that you have to write and optimize all that extra code yourself, then debug it. You might not want to spend that much time on the project. So, depending on how much time you want to dedicate to the project,and how fast the code needs to run, perl may or may not be the right language for the job.

I have to ask these questions now as I'm preparing my Xmas list! and I get a new Perl or CGI book every year. You might also consider a book on general graphics programming, or one specifically on coding for computer games. I heard that there's a way to turn Perl into exe files so you could give it to people who don't have Perl to run, is this possible?

There is a perl compiler called "perlcc". It's still marked as "highly experimental", but it can compile a simple "Hello, World" program. Then again, the few other programs I've tried have all caused perlcc to crash. Try it, see if you like it, but don't bet your company on it just yet.

Hope this is helpful,

--
Ytrew Q. Uiop


In reply to Re: Perl TK books by Ytrew
in thread Perl TK books by Anonymous Monk

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.