• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Aspect ratio correction when surface is disabled

I

iQd

Guest
Hi,

I have completed a new game on the Game Maker, however there is one issue that I have not been able to solve; manual setting of aspect ratio.

Originally I had the aspect ratio setting active on the Global Game Settings and I though I don't have to touch it. However when testing the game on a few Android devices, lower end tablets (with Android 4.x.x) had very poor FPS. It was so poor like watching the game on slow motion. Those tablets run other much more complicated games with ease.

On a new Lenovo tablet the speed of operation was about 80% of what it should be.

I did not expect this effect as in the game you just shoot one ball up. With the ball I have maximum of three sprites moving. So this should be a piece of cake even for any older device.

I started to optimize, read many forum threads and blogs about this and by disabling background colors, power save and application surface, I was able to get the game somewhat playable on the really slo-mo device, and back to normal on the new Lenovo tablet.

All would be good, however the problem now is that if the user's device display is other than 16:9 format, the game's rooms are ofcourse stretched and do not look so good.

What I have needed to do due to very poor performance on different devices, was to disable the application surface.

I have tried to set the aspect ratio with both the application surface enabled and disabled, however it seems to have no effect. My code for doing this has mainly been in the creation code of the first room, as from the documentation I understood this is the correct way.

I have read that you can change this manually, but for some reason nothing I try works or has any desired effect. I can only make it worse or there is no change at all.

At one point I thought that I will just turn the application surface back on and take the heat and negative reviews from users who get the game working too slow on their device, however now because the color filling of the background buffer outside the room is disabled, all kind of graphics crap keep moving outside the room.
I cannot publish something like this, the outside of the room has to be clean and empty.

Now, I am not finding anything new that I would have not yet tried to correct the issue. Would you have a good solution here how could I get the aspect ratio kept at 16:9 and not need to fear that some part of the user base sees the game in slo-mo?

I have views active on all rooms which I needed for zoom and pan functions, however now after completing the game I have seen no use for those functions anymore. Would it help my case to disable views and go without?

Thank you!
 

RangerX

Member
Ok here's a little trick. (there might be other solutions but its the first coming to mind).
When you turn off the application surface, GMS keeps the window settings and the dimension the same without touching it.
So I would try is to simply start your game with the application surface turned on, set the game size and stuff then turn it off. If you have an option in the game to change scaling and such things, turn on the application for a second, change your stuff, turn it off again.
 
I

iQd

Guest
I did try that earlier, however I remember there was no change in the result.
It is like the resize commands would have no effect at all, application surface on or off.
I must be missing something.
The control of the view works ok, however the surface itself I cannot seem to be able to change even if I directly set some dimensions, I still get the same operation; the room stretches to the display dimensions.
 

RangerX

Member
Did you do it in the right order? Resizing stuff with only work when the application surface is ON.
Also, you should show what you tried (code), at least we will able to try and find a solution.
 
Top