I’ve been trying to make a game that initially gets a window size of 1920 x 1080 and extends the content to that res (so that all platform elements fit properly, which is better than using zoom as it doesn’t account for aspect ratio on different monitors), but then switches to the native monitor resolution (tried with ScreenWidth() and ScreenHeight() so far), then stretches the image to that size, and then enters full screen.
However, I’ve been getting crashes on one PC all the time when trying to enter full screen mode, and then later even with windowed mode and using the window sizing and ScreenWidth() x ScreenWidth() parameters (or even manually typing 1920 x 1080 - on a monitor of that res).
Finally, on my main PC, when I set the initial scene size to very small in game properties, and then set it to 1920 x 1080 and set “yes” for extending the game image to see the full scene, it seems to stretch instead of actually extending.
How would you go on about doing this task? The end goal of course is to have the game perform the same on all computers, displaying the same parts of the map (using stretching) on all monitors, but not relying on using an extremely low resolution.
If you try to set the size of your window (which is the size of the inside part of the window) to the size of your screen, it may fail on Windows as it doesn’t accept a window which full size (including borders) is bigger than the screen. You can try to set a lower resolution, then go to fullscreen, then change to the full resolution.
In my previous test, changing the window size after going to full screen did not work. I’m not sure that it even always followed the previous window resolution as set by the set screen resolution command, but instead might have used only the initial screen resolution set in the project sometimes, and sometimes the screen resolution as set by the event command (not sure what caused the difference in handling). I have considered the border issue, but I do need the resolution to be 1920 x 1080 at some point , and later on stretched to the native resolution. Interestingly, on a netbook with 1024 x 600 windows simply downsized the window to native resolution, no errors. But same win, different PC, and 1920 x 1080 native res crashed instead.
I guess I could use a smaller resolution and then add a zoom factor (e.g. 1280 x 720 with 0.5 zoom), but this will generate a quality drop after stretching to a FHD screen.
I’m trying to maintain a balance between a reasonable quality, and the game appearing similar on all devices (otherwise, one PC may not be able to see some of the platforms, as the camera is of the scrolling type, and does not follow the player directly).
Edit: If there’s any better solution to accomplish this, please let me know. I think the HTML 5 player handles everything better/more easily regarding native resolution and aspect ratio settings.