I am making a simple platformer game. For it to run smoothly it needs to run at about <110 fps. When the game is at 640 by 512 it runs around there, however when I scale it up to 1280 by 1024 it halves my frame rate How do I fix this? and why does this happen?
NOTE: this is not my full code but snippets of code where blitting/ resizing happens.
resized = True
screen = display.set_mode((640, 512), RESIZABLE)
blitSurface = Surface((1280, 1024)).convert()
while: true:
for events in event.get():
if events.type == VIDEORESIZE: resized = True
blitSuface.blit(bg[0][0], bg[0][1])
blitSuface.blit(bg[1][0], bg[1][1])
blitSuface.blit(bg[2][0], bg[2][1])
if resized:
fit_to_rect = blitSuface.get_rect().fit(screen.get_rect())
fit_to_rect.center = screen.get_rect().center
scaled = transform.smoothscale(blitSuface, fit_to_rect.size)
resized = False