You should prepare and update an image based on what the player is doing when the player does something, not when it is time to paint the screen.

I press space bar, player jumps, image updates,...