手动计算fps的pygame动画

"""
   手动计算fps的pygame动画。
   本程序粗略地计算了fps。
"""

import pygame
import time

width,height = 543,360
screen = pygame.display.set_mode((width,height))
pygame.display.set_caption("中秋快乐动画")

# 加载图形帧,转换成surface
images = [pygame.image.load(f"中秋快乐/{index:04d}.png")
          for index in range(1,30)]

amounts = len(images)
index = 0
running = True

You must log in to read the rest of this article. Please log in or register as a user.