Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Perl TK books

by Aighearach (Initiate)
on Nov 12, 2004 at 03:16 UTC ( [id://407256]=note: print w/replies, xml ) Need Help??


in reply to Perl TK books

Perl/Tk is very excellent for building fairly fast, very cross platform applications. It's a real pleasure to be able to develop things entirely in my comfy *nix world, and then send them off to my windows friends and have them already work, without any porting. Sometimes I have to tune things to get a pointer icon to be the right color, but that's the extent of it.

It's not generally as fast as something like SDL. And it doesn't try to be.

My only game experience with it, is a chess client for internet chess. For something like that, it can draw the arbitrary bitmaps used for the pieces very fast, and the user doesn't notice any speed difference with features like "piece dragging" compared to a native app. So it is very fast for normal GUI types of things, and moving sprites around.

However the object model is rather large, and again, is optimized for things other than speed, like portability, extensibility, etc. If you're planning on living in the upper half of the graphics capabilities on the users machine, then really don't expect Tk to cut it. Also, when I was doing all the graphics at a low level using Tk::Canvas, it wasn't as efficient as Perl/Gtk when it came to updating only a small corner of the window (that became unhidden). Also, it is prone to creating a flash effect when things are redrawn, IF you are not careful in your coding.

So my recommendation is, use Tk if you can get away with it! Also, the books suck. :) The docs are okay. The bundled code examples are what I found most useful. Pay particular attention to perldoc Tk::callbacks and Tk::bind in particular the Ev() constructor, which I found to be the most difficult part of the model to understand.


--
Snazzy tagline here

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-25 07:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found