Letterbox-by-design and free reesolutions

Started by Crimson Wizard, Thu 14/08/2014 18:24:03

Previous topic - Next topic

Crimson Wizard

I need an advice...

I found I mistakenly removed one feature from AGS, the "Letterboxed mode"; I thought it is merely related to how game selects graphics mode. In fact it appears it is used for game appearance design, forcing letterboxed mode. I need to restore this for AGS 3.3.0, but here is one concern that confuses me.

Basically, it can be said that it increases the vertical size of the game when setting display up.
If the game is 320x200, the AGS will set it up as if it were 320x240, and if the game is 640x400, the AGS will set it up as if it were 640x480.

In this mode the borders are visible even if game is run windowed, proving they are part of game design, rather than result of graphics mode.

In the past AGS was restricted to very limited possible graphics modes. For example, 320x200 game could run only either 320x200 or 320x240 (plus integer scaling). This means that letterboxed-by-design game could be run only as 320x240. This practically ensured the borders always stay same size (40 for letterboxed 320x200, 80 for letterboxed 640x400).



Now, the AGS 3.3.0 update1 improved the resolution selection, making more variants available. And upcoming free resolutions update will make it even better with any combination of window resolution / game frame position. And this raises a question: how should the letterboxed-by-design game be dealt in such cases?

It is probably valid that such games should be treated as having higher vertical size. But what if the player's monitor does not support square ratio and the game will require additional borders? This means that the total amount of "blackness" around game will increase, making things look worse.
Does it matter? If not, how this should be solved?


Additionally, with Custom (game) Resolutions, shouldn't this letterboxed mode be valid for other resolutions? Should these be only 16:10 and 16:9 resolutions?
Or maybe this may be worth to introduce some kind of "game borders" project setting and let developer choose any random borders height and width?


E: Of course, I could leave this as it is for the time being (besides it does not look like a lot of people use this), but I am interested in having some plan for the future.

Snarky

I say this is an artifact of the implementation (a bug not a feature). In other words, it should be possible to run the games without those borders.

If game devs specifically want borders as part of their game, there are several ways to achieve that without a built-in AGS game setting for it.

Crimson Wizard

It is not only a question of developing future games, but also of converting older projects. It seems there's already a problem:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=50827.msg636494131#msg636494131
If I understood this right, shaun9991 has one game made in this mode.

I also had another thought about this. I found there's an old code that allows the room to have smaller size than game's size. Although AGS 3 does not allow to make room backgrounds smaller: it fixes them on import, but few older games had some smaller rooms (don't know if this was design choice or mistake).

The smaller room is positioned centered on game screen.

If we reenable this feature, perhaps it may be possible to even upgrade older 320x200 and 640x400 letterboxed projects to 320x240/640x480.

However, there's a difference: in letterboxed games nothing is allowed to be drawn on borders (not even mouse), while with smaller rooms you will be able to draw gui & overlays on "borders".

I'd wish to hear from any game developer who uses/used letterboxed mode to know if such solution will suit them.

shaun9991

Hi guys

Thanks for your message and help on this topic Crimson Wizard.

So I've tried my games out on a variety of different screens and computer setups, and I can see now that AGS naturally changes the games resolution depending on the type of display you are using - which is definitely a big improvement on previous versions where we know things could look bad on certain screens etc at default resolution settings. However, on one laptop, a game which I'd been making prior to 3.3.0 which is 'not' suited to letterbox format, reverts to letterbox format no matter what I do, even though it would appear that the physical screen size would perfectly suit unforced letterboxing. All other screens/computers I've tried the game doesn't have letterboxing, which is fine. I guess I would just like to still have a forceable option in the settings, be it in winsetup or within AGS before compile. Perhaps then if people play the game and it has these forced letterboxing which looks bad, they could forcabley disable them from appearing.

The other game, which is the one you are asking about, was set to letterbox mode by default within the settings in AGS, as we noticed it looked a lot nicer on every screen we tried it on, and it suited the nature of the game. This was done before upgrading to AGS 3.3.0. I appreciate that we could construct the game in letterbox without needing an AGS setting for this, but with many 100s of hours have been spend on it already and it would undo a lot of our work to change this around (and also, we didn't want the inventory etc to be appearing within the borders). The game now won't display in letterbox format. The game still looks OK without letterbox, so if it isn't fixable it isn't the end of the world, but it would be nice if this could still be a forced setting - even if only as some sort of hotfix version for games that people have been working on prior to the release of 3.3.0.

Sorry I'm not too knowledgeable on the technical side of how resolutions work and scale, so forgive me if this all sounds a bit silly. I realise I may also be the only person in the world experiencing this issue, but any help is greatly appreciated :)

Thanks,
shaun
Support Cloak and Dagger Games on Patreon: https://www.patreon.com/user?u=460039

Crimson Wizard

#4
Alright, here is the test build with letterbox mode back (should be copied over latest 3.3.0):
http://www.mediafire.com/download/ws9lsfhqelthcjs/reimpl-letterbox-by-design.zip

Differences from 3.3.0 are:
1. Letterbox game option is back. In the Editor I moved it to the topmost "Setup" section (was in "Visual"), closer to "Resolution".
2. In winsetup two "borders" option are inverted: instead of "Enable *** borders" they are now called "Prefer no *** borders". Default is off (accept borders). I believe this will make it more clear to user what they do (I'll elaborate below).
3. AGS writes current device resolution and available graphics driver modes to the log (this info might be useful).


Regarding letterbox mode, what it does is makes AGS to think that the game is 320x240 / 640x480 instead when it looks up for compatible display mode. In all other aspects game size is still considered normal (320x200 / 640x400).
This also means that you won't be able to remove the borders no matter what, because they are part of the game design. If that will be a problem, I guess we may add another option to forcedly remove them, but I am not sure if that's needed.

Regarding how scaling works in AGS 3.3.0. I gave some explanations here:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=50257.0
Quote
1. It should support running game at almost any resolution, provided that a) the resolution is not smaller than scaled up game, and b) its sizes are multiplies of scaling multiplier.
For example, if game scaling is 4, then window sizes should be multiplies of 4. If scaling is 3, window sizes should be multiple of 3, etc.
This restriction is implied by how black borders (letterboxing/sideborders) work in original AGS.
If scaling is 1 (no filter), window can have any size (I think).
2. It should automatically find maximal supported nearest-neighbour scaling, if the requested scaling failed. In any case it searches for all combinations of sideborders/letterbox (depending on setup options). Therefore if you computer supports just any resolution equal or larger to game size, AGS must find and use one. Resolutions with desktop aspect ratio are given higher priority.

Here's the example of how the resolution is searched in one particular case:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=50257.msg636486012#msg636486012

The general algorithm has not changed except for inversed logic of border options:
* It will look for all resolutions always, so that SOME resolution is found in the end.
* It prioritizes the resolutions that are closest to game native resolution (ideally - match it, or match uniformely scaled game).
* It prioritizes resolutions which match current desktop ratio.

* If borders are ACCEPTABLE (default, checkbox is unset): it will look for resolution with or without borders, the one that matches better.
* If borders are UNDESIRABLE (checkbox is set): it will look for resolution without borders first, and for resolution with borders only if failed to find one without.

What is the practical difference between those two cases?
To give a simple answer: if you look for "no borders" first, you may find a borderless mode that looks stretched on your monitor (e.g. if you have a widescreen display but square game).
In other words, these options will force AGS choose borderless mode even though it might have incorrect ratio. That's why this option is off by default. But if you hate borders, it's your choice.



Quote from: shaun9991 on Fri 15/08/2014 09:35:39
a game which I'd been making prior to 3.3.0 which is 'not' suited to letterbox format, reverts to letterbox format no matter what I do, even though it would appear that the physical screen size would perfectly suit unforced letterboxing. All other screens/computers I've tried the game doesn't have letterboxing, which is fine. I guess I would just like to still have a forceable option in the settings, be it in winsetup or within AGS before compile. Perhaps then if people play the game and it has these forced letterboxing which looks bad, they could forcabley disable them from appearing.

The thing here is that if you disabled borders in setup, and the game is still run with borders, this could only mean that AGS could not find a proper resolution to run the game without borders. In such case, if you "forcedly disable" borders, the game will not run at all.

As for your case, it is a question of whether your laptop actually supports ANY borderless resolution, or there's an error in AGS search algorithm.
I must point out again that current implementation of graphic modes in AGS is far from perfect (I gave explanations above). In the next version we will hopefully have more freedom of choice.

Anyway, the extra log output I made into this test build may give more info about your machine. If you run it again, it may become more clear why your laptop can't run it without borders.

Radiant

Thanks CW, that sounds very good.

Since you asked, I'll say that it's a bit counterintuitive to me that checkbox ON = borders OFF and conversely checkbox OFF = borders ON; I would suggest reversing those. That said, this is not a big deal to me.

Crimson Wizard

#6
Quote from: Radiant on Mon 18/08/2014 20:30:12
Since you asked, I'll say that it's a bit counterintuitive to me that checkbox ON = borders OFF and conversely checkbox OFF = borders ON; I would suggest reversing those. That said, this is not a big deal to me.
Yes, I know what you mean.
Frankly, I don't know how to say that
* Turning option on makes no big preference between bordered and borderless mode;
* Turning option off makes prioritizes borderless mode if one exists.

Hmmm... thinking more about this, the choice is really not about prefering borders over no-borders, but rather between "finding best fit" and "don't like having borders".
Any name ideas?

If not for the peculiarities of how scaling works in this version, I'd merge two options in one, but it's a bit difficult to predict whether there will be a case when checking single option out would help to set a better resolution.

//--------------------------------------------------------------
EDIT Hmm, what about "Prefer stretch to width / height"? This is same as "no borders", but without "no" word.

Cassiebsg

Quote from: Crimson Wizard on Mon 18/08/2014 20:53:58
EDIT Hmm, what about "Prefer stretch to width / height"? This is same as "no borders", but without "no" word.

Isn't that also known as "Full screen/fk ratio"?, and with borders would be "Full screen, keep aspect ratio"?... or is it just me that has no idea what you guys are talking about? :)
There are those who believe that life here began out there...

Crimson Wizard

Quote from: Cassiebsg on Tue 19/08/2014 16:22:07
Isn't that also known as "Full screen/fk ratio"?, and with borders would be "Full screen, keep aspect ratio"?... or is it just me that has no idea what you guys are talking about? :)
In a way yes, but with current AGS logic it works with different concept... err, nevermind.

Actually, I am probably thinking too much about this. I'll leave it as it is now.
Besides, free resolutions are coming soon.

shaun9991

Massive thanks for all your help CW, I played around with this last night and found that it worked well for our game that was made for a forced letterbox situation.

I do think that perhaps with the other game (which ALWAYS displays in letterbox) it must just be the laptop I was using. I will run this with a log tonight.

Thanks
Shaun
Support Cloak and Dagger Games on Patreon: https://www.patreon.com/user?u=460039

oskargunn

Is  "Enable 'anti-glide' mode" not included in the latest version?
It's mentioned in the tutorial as an option in the "Character movement" section of General Settings.

Crimson Wizard

#11
Quote from: oskargunn on Fri 12/09/2014 14:06:59
Is  "Enable 'anti-glide' mode" not included in the latest version?
It's mentioned in the tutorial as an option in the "Character movement" section of General Settings.
Erm..., oskargunn, please don't post in random unrelated threads, make new ones instead.

As for the option, it was removed from AGS since 3.1.1. There's now an individual property for every character called "MovementLinkedToAnimation". The tutorial might be refering to an old version of AGS.

oskargunn

I'm sorry about that, it was not intentionally done to post an unrelated issue. I came across this thread because of the letterbox addition and the additional link earlier in this thread, so I thought maybe it was the same with anti-glide.  In future I will post in new thread :)

Thank you for the answer though, it's good to know about "MovementLinkedToAnimation" :)


Crimson Wizard

#13
Quote from: oskargunn on Fri 12/09/2014 14:32:34I came across this thread because of the letterbox addition and the additional link earlier in this thread, so I thought maybe it was the same with anti-glide.
Ah... right, I realized this now. ;)

The changes like this are supposed to be documented in Docs/CHANGES.TXT.

SMF spam blocked by CleanTalk