Games in Perl/Tk

Recently I was looking for Games written in Perl/Tk. I like games and I like Perl and I like games in Perl/Tk because I can compile them (unlike games in Perl/SDL - unfortunately) and provide them to friends.

I found an old Tetris-like game on backpan: Petris. It was written by Mark Summerfield around 1998/1999 or so. Out of curiosity I tried to get it to work. After the installation of Tk::MesgBox, a module which I only found on backpan it worked quite fine.
I was pleased to see that this old source code was still working. There now is a video of the game on youtube: Petris - a Perl/Tk implementation inspired by Tetris

tktetris from Perl/Tk Tools
While woring on the code (firest getting rid of Tk::MesgBox, then making Perl modules from the set of Perl files) I found another implementation: tktetris.
It's part of the Perl/Tk Tools and it looks like this:


Playing Tetris and doing Perl at the same time is now possible.

Other Games in Perl
I found it quite hard to find other Games in Perl/Tk. I thought there were more of them.
In a German bulletin board I found a memory game (see screenshot here). There seems to be some, e.g. tkt - a Perl Solitaire game by Greg Bacon. There are also some videos on youtube like this Pacman clone and again, Tetis (incl. sound).

There is some stuff in plain Tcl/Tk here which might be ported.

NB: It's not exactly games in Perl/Tk but in case you are looking for more, you can find some games in Perl/SDL here:


I have collected also several of Perl games, mostly or all Tk. If you like them, send me mail.

I wrote a Perl/Tk multiplayer game years ago. It still has a bug: buffering issues with sockets. It should not be so hard to fix it, though :-)

Hopefully fixed in the new version.

Leave a comment

About Alex

user-pic I like Perl.