[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Animated sprites



Does anyone have a recommended way of making animated sprites?

I read the source code to SolarWolf and saw the way Pete Shinners does
it, which is pretty much what you would expect: load a list of images
and blit them in sequence. (I also noticed his animstrip() function,
which cleverly cuts a single long image into multiple small ones. Good
thinking, Pete!)

Since Pete is certainly an expert on pygame, I would guess that there's
no better way of doing it. But I thought I would ask if anyone has any
other suggestions.

-- 
 The first time the [artificially intelligent] creature was put down
 in the game world, he just stared at his feet. I was puzzled, but
 after debugging found that the creature was trying to eat himself.
 He was hungry, and had spotted himself as a nearby convenient object!
     - Richard Evans, creator of the AI game "Black & White"