[Tutor] >> Best setup for animation? <<

Chris McCormick cmccormick@thestate.com
Wed, 28 Feb 2001 14:25:15 -0500

Hi again,
    So, I've been writing a program with Python and Tkinter.  It does
some simple animation, but it is all procedural.  That is to say, I have
several agents moving around my canvas, and they all *take turns* moving
and being re-displayed.  I'm not sure how to do animation the way I
would do it in directX, which is as follows:

1.  Create a primary surface(canvas).
2.  Draw everything in its initial state.
3.  Process AI.
4.  Move everything to its next-frame state on a *hidden* surface.
5.  Make the canvas point to the hidden surface, so all moves are seen
at once.

Thus, my question is two-fold:

1.  Is there a way to create two canvases, and switch between them to
create a blitting effect?  I have to admit that I'm a little fuzzy on
exactly how packing works, and maybe there's a way to display all
updated objects at once with *one* canvas?
2.  Before I go much farther, is the Python Tkinter combo the best setup
for game-type animation?  I've also started looking at wxPython and
PyGame, which uses something called SDL.

I'd like to settle on an evironment and really concentrate on the AI.
I'd stick with Tkinter if only I could get it to blit.

Thanks in advance for any help (or pointers to help) you can provide,