Blender game resolutions!

Hi, I was wondering if it is possible to get a list with the screen resolutions, the same in the operating system settings. And if so, how can I? Right away, I appreciate anyone who can help me.!

Hi, to get a printed value of the 3D View-Port (or) Blenderplayer screen resolution use these functions -

render.getWindowWidth()

| EXAMPLE |
1920

render.getWindowHeight()

| EXAMPLE |
1080


To set the screen size (size, not resolution) -

render.setWindowSize()

| EXAMPLE |
render.setWindowSize(1920, 1080)

[WARNING]
render.setWindowSize() function will only work in Blenderplayer (you can’t set the embedded view-port’s resolution)

1 Like

to directly answer your question, no, not in a way i know of anyway.

be warned that resolutions and fullscreen is very buggy. you need to restore desktop resolution before setting the fullscreen disabled, otherwise it will leave the desktop at the last set dimensions.

another issue is aspect ratio support is all but totally absent.

Text editor > new script > import bge blah blah blah

resolutions = [(1920, 1080), (1768, 992), (1680, 1050)… and so on]

then display that list in whichever manner you want, have the user pick one, then set the resolution with the method specified above.

1 Like

Yes, but I wanted to automate this function because of the various formats of the monitors, it seems that I will have to do this function in the manual itself.

Unfortunately there is no predetermined list of resolutions. What you can do is get the aspect ratio of the monitor and only display resolutions that match that

in the render panel, tick fullscreen and tick use desktop.

if you use standalone or .exe it will automatically set the right resolution

You could also use a pixelate shader with the pixelate value set to a game-property.