g-brrzzn / shootemup-Pygame

A Shoot 'Em Up base game made in Python-pygame from scratch
MIT License
4 stars 0 forks source link

Scaling Resolution Issues and Pixel Distortion #2

Open g-brrzzn opened 1 month ago

g-brrzzn commented 1 month ago

Description: Currently, the game is being rendered directly at the window's resolution, which is causing scaling issues and pixel distortion, especially in fullscreen mode or at higher resolutions.

Steps to Reproduce: Run the game in fullscreen mode or at a resolution different from 1280x720. Observe the pixel distortion and stretching effect on the game's graphical elements.

Expected Behavior: The game screen should be rendered at a fixed resolution (e.g., 1280x720) and then scaled to the window's resolution, maintaining the pixel aspect ratio.

Proposed Solution: Implement an intermediate rendering buffer (Surface) where all the game drawing logic is executed, and then scale this Surface to the current window resolution using pygame.transform.scale().