in reply to Games in Perl

In the past, I have written some basic "board" games like tetris,minesweeper, and tic-tac-toe in Tk. You can find the code for tetris at here. This page is a Tclet game, but also contains the Perl/Tk version. I have found that for games like that even my beginner Tk skills were adequate.

More recently, I became interested in doing simple 3D graphics in Tk. Even thouhg most low-level 2D support is existant within the canvas widget, when 3D applications are involved, the display slows down for even something as simple as a rotating cube. (Mind you, my 3D abilities are very rudimentary, and I am sure that optimization is in order). I would certainly be interested in playing around with what I have so far to see how much I can push Tk. I would be very interested to see what, if anything, you have achieved so far.

Replies are listed 'Best First'.
Re: Re: Games in Perl
by rbc (Curate) on Jan 11, 2002 at 04:35 UTC
    Hi gri6507,

    I too am messing around with 2D and 3D graphics
    in Perl/Tk. What I want to know is have you been
    able to get around the "flashing" problem when
    animating things on the canvas.

    Any suggestion or moral support welcome.

    --
    Its like a dog that can sing and dance.
    It's remarkable because it can do it.
    Not that it can do it well.
      I am not sure which "flashing" problem you are talking about here. If you are talking about refreshing objects then I have a few quick suggestions:

    • if it's a repeated movement use $mw->repeat() function wish short timeouts (like 100ms) and have your routine move the object(s) a little bit at a time.
    • Try not to move EVERYTHING. Move only the things that in your scope of view.
    • Put more RAM into your computer.
    • I hope this helps. If you have any more questions, feel free to drop me a line.