• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

UWP Resizing the game window for uwp

Greetings,

little problem i am having,

recently finally had success with getting the uwp module working and i found that by default the game resizes itself to 1024X756.

no where in my game, nor the resolution of my screen, use those dimension and my attempts to modify the window size using the tools i currently know had no effect. (view_hview, view_hport, windows_set_size)

does anyone know of a way to resize a window which will work specifically inside of uwp, might there be a setting i need to change in visual studio in order to get it to work?

thank you.
 

RangerX

Member
Sorry for the question but what's uwp module?
Doesn't it have its own option tab in the global settings? This is where you would fiddle with that GMS does automatically.
Else there are functions to resize everything as you see fit that probably works for most modules.
 
the universal windows platform module thats for use with windows 10, im not sure exactly who and who does not have it but it was released in was widely released in one of the stable betas a little while ago.

sadly the functions dont work, you can maintain aspect ratio but you end up with a letter box format (two black bars at the top and bottom) first time you ster, not a huge problem the player can just resize the window but its still a bit odd looking.
 

RangerX

Member
I don't see why the view, windows and surface options wouldn't work with the Win10 module. (unless its explicitly stated in the manual??)
With using only the global settings, you can make a game that's either stretched to fullscreen, unscaled at all or scaled up respecting the screen ratio (ending up letterboxed at some sizes, since its about having no stretch).
However, if you want your game to be displayed perfectly scaled 1:1 on any monitor size, you need to code a little bit. There's not global settings for that.

If you want to know about that method, which is the best for 2D games in my opinion and making your game more pro-looking than any other solution, I made a tutorial that should help you. Its what I call "pixel perfect" scaling and that might just be what you looking for. Being fullscreen all the time and pixel perfect is impossible anyways. You need to make choices.

https://forum.yoyogames.com/index.php?threads/how-to-properly-scale-your-game.995/

:)
 
thank you for reference to the tutorial

i still have not found a solution when it comes to the windows size in win10, i just wanted to not have the game start in a letterbox format. and i didnt find anything about it mentioned in the manual so im a bit at a lost

but that said its an easy fix for the player, just manually resize the window.

im going to go through your tutorial, thank you
 
Top