Add HD resolution & FOV settings#667
Conversation
|
Tested with 2560x1440 native. Level 5 still renders the reactor percentages at Y-center, which is what I considered first on seeing this. The resolution picker has options not available on my device, however, can they be retrieved from the OS? |
| #define STAT_SCORE STAT_TIMER | ||
|
|
||
| int Game_video_resolution = 1; | ||
| std::vector<tVideoResolution> Video_res_list = {{512, 384}, |
There was a problem hiding this comment.
I think ideally these options should be retrieved from the operating system and populated as such, using the custom list as a fallback. Thoughts?
There was a problem hiding this comment.
that's a good idea: default resolution is the "native" screen resolution, and the user can otherwise choose from the pre-defined list.
There was a problem hiding this comment.
Well, no, I mean than at the moment I can choose resolutions beyond what my monitor will output, and I assume in some cases choosing one of those options might end up causing a user to get "stuck" with a black screen or a blown-up viewport that puts several items offscreen where they may not be able to correct their mistake.
I mean literally populate the list by querying the OS/GPU for the available resolutions and use the pre-defined list as a fallback if the query fails.
There was a problem hiding this comment.
SDL_GetFullscreenDisplayModes() seems to be the way in SDL3 to query all the supported display resolutions.
There was a problem hiding this comment.
From my testing, going to a higher resolution than your screen does not do anything unexpected... What I'm unsure about is using this approach with multiple monitors that do not have the same resolutions. What happens if the game window is created on the "wrong" monitor and the game does not suggest the right resolutions?
There was a problem hiding this comment.
I've iterated a little more on this, and ended with this solution (implemented in last commit): in a new function run at game launch, ConfigureDisplayResolutions, we iterate display modes with SDL_GetFullscreenDisplayModes() on all available displays, only keep unique (width;height) pairs, and use the current display mode of the default display as the default resolution. -width and -height arguments create a new resolution if it does not exist yet and select it. The current resolutions list is used as a fallback only.
Let me know what you think!
There was a problem hiding this comment.
@JeodC @pzychotic did you have the chance to test this new version? =)
There was a problem hiding this comment.
Good catch, I'll update that. Thanks for testing!
|
Works overall on macOS. I set it to 2560x1440 and looks lovely. I run into a non-ideal situation when I subsequently change the resolution while in game, though. This is from starting out in 2560x1440.
|
|
the menu placement is less than ideal indeed, I'll see what I can do. Thank you guys for testing! |
Create a new menu to allow the user to choose higher resolutions
|
@halprin that should be fixed, we now only change resolution when exiting the config menu |
|
We have 2 approvals, let's merge this |





Pull Request Type
Description
This adds support for setting higher resolutions, as well as the FOV angle. The projection math has been corrected so the aspect ratio is automatically computed given window dimensions.
Possible improvements (probably not in this PR):
This work is derived from the Piccu Engine that has done this before.
Related Issues
Closes #205
Screenshots (if applicable)
Descent 3 running in glorious 2540*1440

New video configuration menu
