DaveInDev
Member
Hi,
I am under Windows 10.
For the moment I was developping my game in a window smaller than my Full HD display, with an application surface of the same size as the window. No problem. Everything is 1:1, crisp and clear.
Now I would like to change window size within the game if needed (custom graphical options), and also possibly going to fullscreen or "windowed borderless fullscreen" without exiting the game.
From what I read and understand, I made this little test program here :
(use SPACE to change window size and F to toggle fullscreen)
My problems :
1 - window size is changing correctly for "small sizes", but when I try to give it the size of the display (in my case 1920x1080), it seems that I cannot obtain this size but 1920x1061... And as I resized the surface and room to 1920x1080, there is a slight distorsion which gives problems (you can see it on the diagonals of the moving objects that are aliased or the upper text that is a bit cropped). I don't understand why I cannot get this window size. (my secret goal would be to obtain a full size window, like a "windowed borderless fullscreen").
2- If I use F to switch to fullscreen, after a disturbing screen resolution flip, I obtain a good result. But then if I press F again to go back to windowed mode, I discover that under Windows, my desktop is all messed up, as if the resolution was changed in between (windows size are reduced, firefox displays big fonts, etc...). Strange. That's a problem that I never encounter with other games when I switch to fullscreen... So what am I doing wrong ? I suspect that the order of my commands or the timing might be a problem ?
3- another strange detail : at the end of the draw event of the obj_screen, I draw 2 rectangles around the room to visualize the room limits. It is strange that the first red rectangle is not visible, no ?...
How are you dealing with this window size change in the graphical options of your game ? Can you help me with these problems ?
I am under Windows 10.
For the moment I was developping my game in a window smaller than my Full HD display, with an application surface of the same size as the window. No problem. Everything is 1:1, crisp and clear.
Now I would like to change window size within the game if needed (custom graphical options), and also possibly going to fullscreen or "windowed borderless fullscreen" without exiting the game.
From what I read and understand, I made this little test program here :
Test screen.yyz
1 file sent via WeTransfer, the simplest way to send your files around the world
we.tl
My problems :
1 - window size is changing correctly for "small sizes", but when I try to give it the size of the display (in my case 1920x1080), it seems that I cannot obtain this size but 1920x1061... And as I resized the surface and room to 1920x1080, there is a slight distorsion which gives problems (you can see it on the diagonals of the moving objects that are aliased or the upper text that is a bit cropped). I don't understand why I cannot get this window size. (my secret goal would be to obtain a full size window, like a "windowed borderless fullscreen").
2- If I use F to switch to fullscreen, after a disturbing screen resolution flip, I obtain a good result. But then if I press F again to go back to windowed mode, I discover that under Windows, my desktop is all messed up, as if the resolution was changed in between (windows size are reduced, firefox displays big fonts, etc...). Strange. That's a problem that I never encounter with other games when I switch to fullscreen... So what am I doing wrong ? I suspect that the order of my commands or the timing might be a problem ?
3- another strange detail : at the end of the draw event of the obj_screen, I draw 2 rectangles around the room to visualize the room limits. It is strange that the first red rectangle is not visible, no ?...
How are you dealing with this window size change in the graphical options of your game ? Can you help me with these problems ?