Window mode resolutions and resizing

A forum for chatting about in-development game features.
User avatar
luciderous
Posts: 58
Joined: Mon Feb 02, 2015 8:17 am
Location: Ukraine, Kyiv

Window mode resolutions and resizing

Postby luciderous » Mon Mar 16, 2015 4:25 pm

sven wrote:There's more we could in theory be doing here, specifically, we could try to remember the size and location of the game window, along with the fullscreen state.

After switching from ‘fullscreen’ to ‘windowed’ mode, the resulting window can be resized arbitrary, resulting in very weird visual layouts. IMHO, the window should be locked to some predefined (selectable?) resolutions instead.

User avatar
sven
Site Admin
Posts: 1621
Joined: Sat Jan 31, 2015 10:24 pm
Location: British Columbia, Canada
Contact:

Re: Suggest - Features and Improvements

Postby sven » Mon Mar 16, 2015 4:48 pm

luciderous wrote:
sven wrote:There's more we could in theory be doing here, specifically, we could try to remember the size and location of the game window, along with the fullscreen state.

After switching from ‘fullscreen’ to ‘windowed’ mode, the resulting window can be resized arbitrary, resulting in very weird visual layouts. IMHO, the window should be locked to some predefined (selectable?) resolutions instead.


Yeah -- the trouble here is that limiting the allowed window resolutions is a feature that's hard to implement well. What the game does atm is to set a minimum width and height for the window -- so you can't make it less than 640px wide or 420px tall. But, what matters for gameplay purposes is really aspect ratio, more than absolute size, and given the way the Windows OS works, there's no natural way to impose that kind of restriction.

My basic philosophy atm is that the game should look good and play well at the two main aspect ratios we expect most people to be using (4x3 and 16x9). Other aspect ratios may or may not play as well -- and profile modes, in particular, won't look good at all. But, there's enough of a range of different monitor sizes and screen setups out there that I'd rather not limit the game to a fixed set of different resolutions.

User avatar
luciderous
Posts: 58
Joined: Mon Feb 02, 2015 8:17 am
Location: Ukraine, Kyiv

Re: Suggest - Features and Improvements

Postby luciderous » Tue Mar 17, 2015 3:48 pm

sven wrote:But, what matters for gameplay purposes is really aspect ratio, more than absolute size, and given the way the Windows OS works, there's no natural way to impose that kind of restriction.
...But, there's enough of a range of different monitor sizes and screen setups out there that I'd rather not limit the game to a fixed set of different resolutions.

Pardon my ignorance, but why not? AFAIK, deliberate window resizing is unique to SiS only, all other games simply disable manual 'click-drag resizing', and leave only a set of resolutions/aspect ratio options in the menu for the player to choose from. And it's not that many options to list either. 3-4 for each aspect ration at most ;) I can do a concise research on this topic, if you like, and provide you with such a list, to save your time.

User avatar
sven
Site Admin
Posts: 1621
Joined: Sat Jan 31, 2015 10:24 pm
Location: British Columbia, Canada
Contact:

Re: Suggest - Features and Improvements

Postby sven » Tue Mar 17, 2015 4:13 pm

luciderous wrote:
sven wrote:But, what matters for gameplay purposes is really aspect ratio, more than absolute size, and given the way the Windows OS works, there's no natural way to impose that kind of restriction.
...But, there's enough of a range of different monitor sizes and screen setups out there that I'd rather not limit the game to a fixed set of different resolutions.

Pardon my ignorance, but why not? AFAIK, deliberate window resizing is unique to SiS only, all other games simply disable manual 'click-drag resizing', and leave only a set of resolutions/aspect ratio options in the menu for the player to choose from. And it's not that many options to list either. 3-4 for each aspect ration at most ;) I can do a concise research on this topic, if you like, and provide you with such a list, to save your time.


Yeah, it's a fair question :) The short answer, perhaps, is that I'm a bit of an eccentric when it comes to screen setups, and don't like the way most strategy games handle window management. I like having the flexibility to play a game, while simultaneously keeping a few other windows open. In Anno 2070 -- the webpage I generally keep up is the build tree wiki, and in SOTS, it's the javascript enabled tech tree svg. But keeping a gchat window or something similar open as well can also be handy. In both SOTS and Anno, making that work was a source of constant frustration -- Anno 2070, in particular, as one of the costs of that game's gorgeous graphics seems to be a tendency to crash hard if you alt-tab too often into a web browser.

So in my mind, giving players the power to arrange the game window on their desktop in whatever way works best for them is important. And as long as there's no technical reason that we need to do so, I don't want to pick a dozen or so legal window sizes, and force players to choose between them.

My back-of the envelope math suggests that there's several hundred thousand distinct window sizes for which the game should both look good and be fairly playable -- and I think the modest benefit of letting players choose whichever of those sizes works best for them outweighs the modest cost of looking slightly silly in the case that someone tries to resize the game into a strange aspect ratio.

edited: that said, it might be worth making it as clear as possible to players that there are some screen sizes where we don't expect the game to play well. popping up a warning dialog of some sort when the window is resized to an aspect ratio that we don't have a decent GUI layout for is probably a good idea. just something along the lines of "SiS is not designed to be played in a 500x1600 window -- are you sure you want to continue using this resolution?"

User avatar
luciderous
Posts: 58
Joined: Mon Feb 02, 2015 8:17 am
Location: Ukraine, Kyiv

Re: Suggest - Features and Improvements

Postby luciderous » Tue Mar 17, 2015 4:49 pm

sven wrote:And as long as there's no technical reason that we need to do so...

The problem is, you most probably won't be able to guarantee a visually pleasing and consistent widget layout in game if players resize the main window arbitrarily. I mean there are layout problems even as it is, in fullscreen (with 16:9 AR), and I frankly doubt there is any good algorithm to take myriads other resizing varieties into account.

sven wrote:popping up a warning dialog of some sort when the window is resized to an aspect ratio that we don't have a decent GUI layout for is probably a good idea. just something along the lines of "SiS is not designed to be played in a 500x1600 window -- are you sure you want to continue using this resolution?"

I still believe you are over-complicating things here a bit and making your life needlessly more difficult, but hey - your game, your call ;)

I'd at least recommend to 'lock' horizontal/vertical guides to some aspect ratios so that the window is resized uniformly within those constraints.

User avatar
sven
Site Admin
Posts: 1621
Joined: Sat Jan 31, 2015 10:24 pm
Location: British Columbia, Canada
Contact:

Re: Suggest - Features and Improvements

Postby sven » Tue Mar 17, 2015 5:16 pm

luciderous wrote:I still believe you are over-complicating things here a bit and making your life needlessly more difficult, but hey - your game, your call ;)


Yeah -- maybe :) As an engineer -- my understanding is that the tranditional "list of allowed resolutions" is really an artifact of exclusive-mode directX rendering setups. SiS isn't written in directX, and even if it were, it's not graphics intensive enough to need exclusive mode.

I think the UI layout logic needs to be at least somewhat complicated, because we do want to try and support most fullscreen monitors. That means 16x9 and 4x3 at a minimum, but, there's a few less common landscape ratios out there as well -- a quick glance at
wikipedia brings up a chart that suggests 5x4, 5x3 and 16x10 all have a small but notable market share.

Support for one aspect ratio is easy, support for 2 requires including a lot of logic for stretchable UI elements that otherwise wouldn't be necessary. Support for 3+ isn't really that much harder than 2, depending on the details of just how the strechable UI logic works. And once you've committed to a system that can accommodate some amount of stretching, letting people experiment with alternative resolutions doesn't take any extra work.

luciderous wrote:I'd at least recommend to 'lock' horizontal/vertical guides to some aspect ratios so that the window is resized uniformly within those constraints.


This is where it gets dangerous :) That kind of guide/lock system is exactly the kind of feature that probably would take a lot of extra time and effort to implement. And even if I could find the necessary windows API hooks to make it happen, I suspect players would find it more confusing / frustrating than helpful -- aspect ratio-based constraints are not something that people expect when re-sizing their windows.


Return to “Testing”

Who is online

Users browsing this forum: dearmad and 66 guests