Mr. Unp3rf3ct
Member
So as my title suggests I'm experiencing issues with view_wport and view_hport which I have never experienced before.
I've used GMS 1.X for a few thousand hours across the last years and when writing a framework for handling scaling today I found this issue. For performance reasons I've disabled the application surface and thus disabled the built in "keep aspect ratio" setting in global game settings. So far nothing new for me, this is expected behaviour. However what isn't expected is the following (project download here):
On the left the application surface is enabled. It's the same dimensions as the rooms configured viewport and handles aspect ratio and resolution.
On the right however the surface is disabled. The viewport is set to the same settings as before but is completely bypassed in rendering somehow. Neither the resolution nor the aspect ratio respect it, the resolution is tied to the the window sizes height if the window is wider than the view and the window's width if its taller. For all I know in the right pic the ports targeted aspect ratio could be set to be super slim and tall and it just wouldn't care. Nothing changes when changing it on the fly too.
Also as the text states it shouldn't be readable in the right picture as the resolution is set to 128x128 pixels but is being output at 512x512 stretched to 512x700.
Expected behaviour would be that the resolution is dictated by the viewport size and because the port coordinates are set to 0 a square featuring the view contents should appear in the top right corner, unstretched with a black bar on the right.
The positioning would then of course be done using some basic maths to place it in the middle of the viewport. This is not possible as when the ports size is set to 10 for example the x coordinate 5 still represents the middle of the screen, however resolution isnt tied to it so the whole view is still at a crazy high resolution.
Effectively this ruins any performance gains from disabling the application surface as the resolution on a 4k or higher for example display would be uncapped instead of sticking to the port. Also letterboxed scaling is impossible to achieve. (Letterboxing was ment for a small 8 bit style minigame in a different game, but now it just stretched to fill the entire screen).
I've also toyed around with the gui size, but it doesnt affect anything either.
The thing is in this thread: "Keep Aspect Ratio" GGS and Disabled Application Surface
Everything behaves as expected (Marked as solved, Working according to poster)
As this is a thread focused on Android I set up the export to android and it didn't work on there either. YYC didn't affect anything either on any platform.
I would love to try and go back to the current GMS version at the time of the post being made, but I don't want to provoke glitches stemming from downgrading. I've been using the last version before sunset for this, but everything is tested on sunset as well and behaves the exact same way.
Does anyone know what I could be missing or how I could fix this? On windows I can adapt the window size to fix this, however on Android and in fullscreen I cant do that and turning on the application surface again is a not a viable solution.
Many thanks in advance, I'll do my best to respond when I'm awake and try everything viable.
I've used GMS 1.X for a few thousand hours across the last years and when writing a framework for handling scaling today I found this issue. For performance reasons I've disabled the application surface and thus disabled the built in "keep aspect ratio" setting in global game settings. So far nothing new for me, this is expected behaviour. However what isn't expected is the following (project download here):
On the left the application surface is enabled. It's the same dimensions as the rooms configured viewport and handles aspect ratio and resolution.
On the right however the surface is disabled. The viewport is set to the same settings as before but is completely bypassed in rendering somehow. Neither the resolution nor the aspect ratio respect it, the resolution is tied to the the window sizes height if the window is wider than the view and the window's width if its taller. For all I know in the right pic the ports targeted aspect ratio could be set to be super slim and tall and it just wouldn't care. Nothing changes when changing it on the fly too.
Also as the text states it shouldn't be readable in the right picture as the resolution is set to 128x128 pixels but is being output at 512x512 stretched to 512x700.
Expected behaviour would be that the resolution is dictated by the viewport size and because the port coordinates are set to 0 a square featuring the view contents should appear in the top right corner, unstretched with a black bar on the right.
The positioning would then of course be done using some basic maths to place it in the middle of the viewport. This is not possible as when the ports size is set to 10 for example the x coordinate 5 still represents the middle of the screen, however resolution isnt tied to it so the whole view is still at a crazy high resolution.
Effectively this ruins any performance gains from disabling the application surface as the resolution on a 4k or higher for example display would be uncapped instead of sticking to the port. Also letterboxed scaling is impossible to achieve. (Letterboxing was ment for a small 8 bit style minigame in a different game, but now it just stretched to fill the entire screen).
I've also toyed around with the gui size, but it doesnt affect anything either.
The thing is in this thread: "Keep Aspect Ratio" GGS and Disabled Application Surface
[SOLVED] "Keep Aspect Ratio" GGS and Disabled Application Surface
It appears the Global Game Setting for the game to keep its aspect ratio is ignored when the application_surface is disabled. So it stretches either way. But I need the application_surface disabled to help Android performance. According to the FAQ Are you stopping support for Studio 1.X...
forum.yoyogames.com
As this is a thread focused on Android I set up the export to android and it didn't work on there either. YYC didn't affect anything either on any platform.
I would love to try and go back to the current GMS version at the time of the post being made, but I don't want to provoke glitches stemming from downgrading. I've been using the last version before sunset for this, but everything is tested on sunset as well and behaves the exact same way.
Does anyone know what I could be missing or how I could fix this? On windows I can adapt the window size to fix this, however on Android and in fullscreen I cant do that and turning on the application surface again is a not a viable solution.
Many thanks in advance, I'll do my best to respond when I'm awake and try everything viable.