Do screen resolutions differ among setups?

Status
Not open for further replies.

Lach

he/him
Moderator
Sonic Team Junior
Kart Krew™️
Judge
I'm trying to test whether my HUD Lua script works consistently on all resolutions. I noticed that when I ran srb2win with OpenGL, the list of available resolutions was very different to the list of available resolutions when I ran srb2dd on Software.

I can't properly run Software with srb2win, nor can I use OpenGL with srb2dd. I didn't think this would be an issue at first, but now I fear it may mean there are resolutions I cannot test on.

My fullscreen resolution is 1400 x 900. My question is, if I can get my script to work with all the resolutions currently available to me, will it work with the ones I cannot test on, assuming there are any?

Here are my available resolutions, from SDL2 OpenGL and DirectDraw Software respectively.

m8bX77S


GODKMM5
 
As far as I'm aware from checking the source code, srb2dd and srb2win are different regarding the list of resolutions... in that srb2dd makes a list of resolutions that are "available" for the computer or such I think, while srb2win's list of resolutions are currently all pre-defined in the source code. (I think srb2win's was originally meant to be the list of windowed mode resolutions, but it seems they got turned into the definitive list for fullscreen too when SDL2 was being implemented?)
 
As far as I'm aware from checking the source code, srb2dd and srb2win are different regarding the list of resolutions... in that srb2dd makes a list of resolutions that are "available" for the computer or such I think, while srb2win's list of resolutions are currently all pre-defined in the source code. (I think srb2win's was originally meant to be the list of windowed mode resolutions, but it seems they got turned into the definitive list for fullscreen too when SDL2 was being implemented?)

Well, the OLD SDL 1.2 code kept two display lists, one for windowed and another for fullscreen

But in the SDL 2.0 interface code, we keep a static list of screen modes with diff aspect ratios (1.60 (DOOM), 1.3 and 1.66)

We can add more modes, but we limit it to 18 modes due to how the video mode menu displays all the modes
 
To directly answer the question at hand: the modes in srb2win are the same between software and OGL, so any resolutions there will be the only resolutions available once srb2dd is fully deprecated (once the SDL2 builds work well for everyone). However, I'd suggest testing in software mode for different resolutions; OGL stretches the HUD out so the standard 320x200 grid covers the window regardless of resolution, while software scales most things up only to the next integer scale value and doesn't distort by aspect ratio.

In general, if you're coding for general resolution testing and properly using V_SNAPTO*, your HUD hooks should be compatible with all resolutions. Some specific cases, like full-screen effects or object-tracking HUD items, will need special considerations, though, so testing in different resolutions is always good.

As an aside, the reason green resolutions (multiples of 320x200, not just any 16:10 resolution) are recommended for general play is because of this scaling behavior; all green resolutions will map HUD drawing calls the same way (barring V_NOSCALEPATCH shenanigans, which are an advanced use case) which makes supporting them all incredibly easy.
 
However, I'd suggest testing in software mode for different resolutions; OGL stretches the HUD out so the standard 320x200 grid covers the window regardless of resolution, while software scales most things up only to the next integer scale value and doesn't distort by aspect ratio.
I'm well aware of the differences between Software and OpenGL, and I have written my code accordingly. The thing is, I can't be sure that the Software version of the code works on the resolutions I can't test on (i.e. the ones that srb2win supports that DirectDraw can't).
I can't properly run Software with srb2win, nor can I use OpenGL with srb2dd. I didn't think this would be an issue at first, but now I fear it may mean there are resolutions I cannot test on.
Because of the way OpenGL works I think it certain that the script will work for all of SDL2's OpenGL resolutions. Narrowing my question down to this, it would be: If my script works for all the resolutions listed in my DirectDraw Software setup, will it work for all the ones in SDL2?

If it helps, here is the line of code in question:
Code:
elseif v.renderer() == "software"
	v.draw(v.width()-28*vx,4*vy, v.cachePatch("HUD_CRBX"), V_NOSCALESTART)
end
(vx and vy are the integer values for v.dupx() and v.dupy() respectively.)
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top