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

Andrew Wilkins toodles@yifan.net
Thu, 1 Mar 2001 08:14:56 +0800


Hi Chris,

Pygame allows you to blit surfaces, but you don't need to do this as the
screen isn't updated until you say so, it works on a virtual screen anyway.
Take a quick squizz at the docs. As for the question "which one is
better...?", well I can't answer that, because I haven't had enough
experience in TKinter. In fact I haven't had much experience in anything
programming, but Pygame is very cool.

Andrew

> -----Original Message-----
> From: tutor-admin@python.org [mailto:tutor-admin@python.org]On Behalf Of
> Chris McCormick
> Sent: Thursday, 1 March 2001 3:25 AM
> To: tutor@python.org
> Subject: [Tutor] >> Best setup for animation? <<
>
>
> 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,
> Chris
>
>
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>