1

My game in pygame module uses a low quality image as a background (its low quality on purpose - i thought this way i would get better fps), other images I use in the game are small and of substantially higher quality than the background image. The problem is, that as my display is set to high resolution, when I scale the low quality background image to fullscreen size and then blit it onto the display, the game has the same fps as if I would use a high quallity backgroung image. is there a way I can stretch a low quality background image to full screen while maintaining fps.

( i tried setting the display resolution to lower numbers, but my high quality images then looked quite crappy)

  • 1
    I'm not completely sure, but I think your assumption is wrong. I think fps does not depend on the quality of the image. When a surface is blit on another surface, each pixel of the surface is modified. The bigger the blit surface, the more time consuming the operation is. The moment you scale the low quality image to a bigger size, you are increasing the pixels to be blit, consequently increasing the operation time. – Valentino Apr 20 '19 at 00:52
  • as @Valentino said - bigger image need more time, but I think big image shouldn't be problem because blit should work fast. I would expect that rescalling need more time then bliting. So better use image which fit to window/fullscreen. And test speed when you blit only background - maybe it work fast and problem are other objects on screen. – furas Apr 20 '19 at 03:12
  • Thanks :) your answers were helpful – Matúš Hedera Apr 20 '19 at 16:35

0 Answers0