in reply to Perl TK books
Now you need to go through the hard lesson of learning to re-use widgets, and other aspects of keeping Tk running fast and clean. This is best done by experimenting with code. I keep my Tk skills going by making little games.
Here is a screenshot of a scrabble like game which you can play over a network thru sockets. You can get it here is you want to see how I did it-> ztk-babel
As far as books go, Mastering Perl/Tk is still the best. But like I said, your best avenue to learning is to actually start playing with the code. For instance, if you want a canvas based game, setup the canvas, decide how you are going to store widgets( probably in a hash) and get some rudimentary widgets and movement on the screen. Once you see the problems you are facing, then you start to realize what code you will need to implement your game....and like I said, watch your memory use constantly, there are well known pitfalls and fixes when using widgets, especially photo objects.
Right now I'm working on a network poker game with Tk, so don't think it can't be done. Admittedly SDL is geared up for games, especially for adding sound and zooming. However, Tk may be a better choice if you want to learn and extend your skills to non-gaming data display with Tk. Tk is generally more useful than SDL, in my opinion, but SDL is quite good. Tk is probably better for cross-platform compatibility than SDL, easier to install etc. SDL is a whole mess of different libs to get and install.
|
---|