python - Pygame display.update() with dirty rects still updates the whole screen -


i ran trouble pygame while making character move on screen through path on grid. collecting dirty rects .update() method not taking account updates whole screen. happens on 1 loop inside main game loop. structure this:

while not done:     other stuff      if character should move:         step in path:             while not in target:                 update coordinates couple pixels                 blit , collect dirty rects                 update(dirty_rects) #this 1 still updates whole screen      update(dirty_rects) #this 1 works correctly, updating dirty places 

so inner loop moves character according steps in path given, , game goes main loop. problem is, inner .update() draws whole screen again if give tiny rect rect(0,0,10,10) input. outer .update() works fine. situation destroys framerate when character moving. takes around 70ms between each frame while outer loop takes around 5ms. there can it?

i using python 3.4.2 on os x, updated 3.4.3 no effect.

e: tried installing pygame on linux well. on side, on python 3.4.0 there no issue dirty rects, other things seem quite messed up, handling color keys , alphas.

videos:

on os x

on elementary os


Popular posts from this blog