What is the easiest way to set different resolutions with SDL2?
I was trying to use the SDL_RenderSetScale()
function first, but for some reason it alters the physics of the game (jumps are higher or smaller for example). My other guess was to use SDL_RenderSetLogicalSize()
, since it was mentioned in another similar question here, but I'm not quite sure how it is supposed to work.
What I would simply like to do:
Let's say I have the game world seen in 320x240. Then no matter the resolution of the window, what we see in 320x240 is simply "scaled up". So for example: what is supposed to be 1 pixel in the "original view", becomes 4 pixel in 640x480 and so on, but all the logic still happens in 320x240. So when I move something by 1 pixel, it will move seemingly 4 pixels in 640x480, but only 1 logically.