Legacy GM a quick question regarding fullscreen

fxokz

Member
Okay, so basically i was wondering if its worth attempting to optimize a game so that it the window can be fullscreened for a better game experience. So far my game isnt that bad if i fullscreen it. theres only a few problems that need to be solved.

1. I think the gui event causes some problems because some of the stuff i draw onto the screen still stays in place aka the top left of my screen when fullscreened.

2. theres a room in my game that isnt fullscreened (the screen is on the top left and the rest is black) probably because theres a shader in that room (thats my guess anyway) unlike every other room..

3. this one is nothing really big and can just be excused because its my first ever time playing around with fullscreen and thats tearing on the screen probably because i didnt factor in the resolution when i first started developing the game.

So what do you guys think? Is it one of those things that should be thought through from day 1 like multiplayer/networking or is it one of those things that with some extra work can be achieved? Overall is it worth it? My game really does look better in fullscreen as it shows off all of those small sprites that basically need magnifiying glasses to be seen properly. (which is another flaw i should of thought through from the beginning)

Looking forward to hearing from you guys.
 

JackTurbo

Member
Personally I think full screen is the way to go, however offering a windowed option cant hurt.

Are you resizing your GUI layer? And how are you positioning your GUI elements?

Personally my approach to GUI elements is that always keep the layer the same as the native resolution of the display. I use an oCameraControl object to manage all my views and gui stuff. Here I use display_get_width and display_get_height and store the result in a variables called screenHeight and screenWidth. I then resize the GUI layer to match this.

I then use the screenHeight and screenWidth variables to position the various gui elements relative to either; one of the corners of the screen, centre top, centre bottom or centre centre. Always positioning my elements relative to one of these points allows you to build a flexible system that will look right on almost any display.

So for example in the turn based strategy game I am working on, I have a turn order display which is essentially a vertical stack of images (40px square). This is positioned on the gui layer at (screenWidth - 55px), 15px. This puts it in the top right corner stacking downward with a pleasing 15px margin regardless of the screen size.
 
Last edited:

RangerX

Member
Being able to play fullscreen and windowed are to me basic options that a large majority of gamers will expect, me the first. It's VERY important that you sort this out.

1- Should easily be fixed if you size the GUI layer properly
2- What does this cause? A room itself isn't supposed to change anything in the "fullscreen/windowed" matter, unless you're not using views --> which you should.
3- If there's tearing its because v-sync is off. Turn it on. Else what you call "tearing" is something else.

To me it needs to be there day one. Even before multiplayer.
 
A

anomalous

Guest
Typically it's manageable, it is not something you necessarily cannot fix now without too much trouble.
Well, hopefully you use a lot of built in functions and a few common variables to know where to draw things, so often its just changing those, and tweaking a few things. But it can be tricky, at least for me, its sometimes a bit of trial/error.
Back up your project before you start a big surgical procedure like this.
 

fxokz

Member
2- What does this cause?
Basically the whole screen is black except for the top left corner where the game (view) is visible. This only happens in 1 room in my game which there is an object which contains shader stuff

Edit: i hope im using the right word when i say tearing. Its sort of hard to explain.. its like when the screen looks like theres a ripple effect. It happens frequently but its a very short effect. Only in fullscreen.
 

RangerX

Member
Screen tearing is:
(please God put the sound off for you sanity. Also, the video is obviously a slowdown but you will see the image tear)
 

fxokz

Member
Screen tearing is:
(please God put the sound off for you sanity. Also, the video is obviously a slowdown but you will see the image tear)
Yes thats exactly what happens! How can i fix it? Also how do u resize the gui? And im still unsure how to fix the shader. Help :(

edit: how exactly do you turn on/off vsync? (okay i figured out how to do it from game settings but how do you make it so that the player can turn it on/off? is there a function for that?)

1 FINAL QUESTION. all of the text i have drawn seems noticeably distorted in a way. I could barely see it when it isnt fullscreened but when it is, its extremely obvious. I guess i can just ignore this.
 
Last edited:

RangerX

Member
For V-sync: display_reset() is the function you're looking for (see manual). However, it makes the screen flash white or black for one frame when you use it.

Final Question: No. Don't ignore this. Graphical distortion looks bad and amateur. If you scale up your game properly, nothing will be distorted.
 
Top