There are some issues in your code, but the most obvious thing is that you are loading the image into the application loop. pygame.image.load
is very time consuming, because it has to read the images from the data store.
Load the image once before the application loop, rather than continuously in the loop:
sky=pygame.image.load("sky.jpg") # <--- ADD
running=True
while running:
# [...]
# sky=pygame.image.load("sky.jpg") <--- DELETE
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…