Reading the pygame tutorial here , you'll find this example: (arrows mine)
for o in objects:
screen.blit(background, o.pos, o.pos) #<---
for o in objects:
o.move()
screen.blit(o.image, o.pos) #<---`
Reading the pygame documentation for blit
here will say this: (italics mine)
blit(source, dest, area=None, special_flags = 0) -> Rect Draws a source Surface onto this Surface. The draw can be positioned with the dest argument. Dest can either be pair of coordinates representing the upper left corner of the source. A Rect can also be passed as the destination and the topleft corner of the rectangle will be used as the position for the blit. The size of the destination rectangle does not effect the blit.
Can anyone help me make sense of this? I have been pouring over my own code for days before I finally noticed in the example they used the 'pos' TWICE in one call, and once in another. I threw this at mine, and voila, the problem of incredibly unsynchronized, strobing, slow animation went away. But I don't understand why.
EDIT: the misunderstanding above was only part of the speed bottleneck. I did not understand (and still am struggling to) that one must multiply their movement increment by the clock tick. Suddenly, everything sprang to life. Here's an example, perhaps it will help some other studious newbie game makers:
clock = pygame.time.Clock()
FPS=60
while True:
timer = clock.tick(FPS)
if label.x < label.target_x:
label.x += (2*timer) #<-----
....the amount one increments their sprite's/surface's position is relative to the number returned by clock.tick
. Suddenly, a modern laptop can make twenty images move around the screen at breakneck speed :)
Thank you Ted Klein Bergman for your help!