Runtime resolution change (experiment)

Started by Crimson Wizard, Sat 16/04/2016 17:54:34

Previous topic - Next topic

Dave Gilbert

Just saw this. Excellent news! Do you need anyone to test this?

Crimson Wizard

I was very busy recently, but the new code is generally done, I think I will clear it up a bit and make the test build on this weekend.

Crimson Wizard

Ok, here you go:
http://www.mediafire.com/file/idxao8mwk3hu6yd/acwin_post-3.4.0--gfxmode-switch_%282%29.zip

As always, I advise you to not use this engine for making actual game.

There may be few problems with it, like switch not working during certain blocking events, but these will hopefully be found and fixed.
I am more or less glad with the code, so if it works in general I can add it to our repository.

Dave Gilbert

Yeesh I didn't see this until now. Apologies! Feel free to poke me via PM if you need someone to test these things. I don't always check the forum as often as I should.

Downloading now!

Crimson Wizard

#24
Well, I received no replies,Whoops I just received a reply from Dave Gilbert. Anyway, I decided to just go ahead and add it to repository.
It's been several months since the release of AGS 3.4.0, and according to our new development rule, there should be a new version about every that much. So I guess we would have a new AGS Beta at the beginning of February with this feature included, that could be tested by anyone.

Dave Gilbert

So I tried it out. I loaded up my game, pressed alt-enter, and the game just restarted itself. I assume that's not the correct behavior? I am running the game in direct3D mode.

edit: same happens in directdraw.

Crimson Wizard

Quote from: Dave Gilbert on Wed 18/01/2017 15:32:04
So I tried it out. I loaded up my game, pressed alt-enter, and the game just restarted itself. I assume that's not the correct behavior?
Yes, this is not supposed to happen.
This problem has been plaguing this test build. For some reason Alt+Enter combo has same key code as F9, that is usually used as Restart in game scripts. I was trying to prevent engine from misidentifying them, but apparently not enough...

Dave Gilbert

Well, I commenting out the "F9 restart" command in the global script and recompiled. This time, I pressed alt-enter and nothing at all happened. I tried it in both DirectDraw and Direct3D mode.

Crimson Wizard

#28
How do you use the engine from that package, and how run the game exactly?
Maybe you ran the game using different engine build by mistake.

If you press Ctrl+V (or Ctrl+Alt+V), what engine version does it show?

Dave Gilbert

#29
Oh my god you're right. I was using a different version of the engine. Using the right one this time.

So. The first thing I notice is that when I run the game, it takes much longer for the game to come up on my screen than normal. 5-10 seconds when it used to be almost instantaneous. And whereas before it had my intro splash screen fade up from black (with the music fading in from silence), it now just sharply cuts to the image and the music with no fade-in for either.

That said, the alt-enter works as advertised. It takes a few seconds to switch from one or the other, and the windowed version isn't an ideal size (it seems to be defaulting to the native size of the game, which is quite small) but it works.

-Dave

Edit: It also takes longer for the game to quit. It used to be instantaneous, and now it's around 5 seconds or so. Not a dealbreaker but it's something I noticed.

Crimson Wizard

#30
Quote from: Dave Gilbert on Wed 18/01/2017 15:57:467
So. The first thing I notice is that when I run the game, it takes much longer for the game to come up on my screen than normal. 5-10 seconds when it used to be almost instantaneous. And whereas before it had my intro splash screen fade up from black (with the music fading in from silence), it now just sharply cuts to the image and the music with no fade-in for either.

That said, the alt-enter works as advertised. It takes a few seconds to switch from one or the other, and the windowed version isn't an ideal size (it seems to be defaulting to the native size of the game, which is quite small) but it works.


That is all not expected to be honest. It was supposed to switch to the window scaled with maximal round multiplier. And I do not remember if it caused any slowdowns...

Just to be sure, here is most recent automatic build containing this feature: http://teamcity.bigbluecup.org/repository/download/AdventureGameStudio_EngineRelease/21988:id/engine.zip

May someone else try this out? I was testing this on two different computers, and it worked fine.

Dave Gilbert

Hm. I usually use the "stretch to fit screen (preserve aspect ratio)" filter. I changed it to "max round multiplier" but I had the same behavior.

Crimson Wizard

#32
Quote from: Dave Gilbert on Wed 18/01/2017 16:25:07
Hm. I usually use the "stretch to fit screen (preserve aspect ratio)" filter. I changed it to "max round multiplier" but I had the same behavior.
It does not currently depend on config settings; when you switch to alternate display mode in game, it takes the "default" config for that mode, which is -
* for fullscreen mode: resolution equal to the current desktop resolution, max round multiplier scaling;
* for windowed mode: window size equal to game scaled using same max round multiplier;

Max round multiplier was chosen as default, because in certain combinations of monitor/game the game scaled to fit screen (even if proportional) can get uneven scaling issues.
I can change this to make it choose same scaling method as in previous mode.

But the point is that the window is supposed to be largest that can fit into screen using given scaling method.

morganw

I've tried the build that you linked. For me, sometimes the change between the modes doesn't work every time. Sometimes it works fine, but I've had it go in circles (seems to be switching and then switching back in a loop) trying to go from fullscreen to a window. I had to press CTL+ALT+DEL to make it stop, at which point it did switch to a window and stay in windowed mode. I've also seen it fail to go fullscreen (seems to change and then instantly change back, but didn't do it continuously). This is using Direct3D.

SMF spam blocked by CleanTalk