So I’ve gotten reports that on some monitors my game despite being in fullscreen plays surrounded by black bars surrounding it or leaks off the screen rather than filling the screen. Is there a way to enforce the engine to fill the screen regardless of aspect ratio.
This is probably what you’re looking for:
It will open a new window which will be fullscreen, and adjust t your desktop’s resolution.
You can change the resolution in my game will thqt effect this
Yeah that does not work
from bge import render render.setFullScreen(True)
see my game launcher (sig) for more options.
For whatever reason and I have tried this before but using code to set fullscreen or wondowed does not work at all
make sure you unckeck all related to it in the renders tab (no fullscreen, no deskop, no vsync,etc. selected).
Then it should work. I’m setting reso and fullscreen etc for quite some time now trough python.
I have done that before, is there anything I need to do in regards to logic bricks to get that working
No. well yes hook the script up to python, but other then that no.
You could put the controller on the top of the execution list by hitting a smal icon on it. (im not home so cant tell how it looks like), but there is a small button on the and/python controllers that says to execute that controller before all others. Maybe that helps.
Other then that, i would say try my game launcher in my sig, see if you can set those settings, if that works then you are doing something wrong i guess.
At this point i have no other clues
What you’re looking for is at the “Option Editor -> Render Tab -> Display Panel -> Framing -> Extend”. It changes your FOV based on the aspect ratio. However you may have problems with the aspect ratio itself on full-screen. Alternatively you can change the camera FOV manually, but at the end is the same so I don’t think it’s worth it.
The aspect ratio depends on the window resolution, on full-screen that should be the same as the desktop resolution. To indicate that you want to use the same instead of a custom one, you must check “Render Tab -> Standalone Player Panel -> Desktop”.
You may have further problems on some cases. For instance if there is a BGE/UPBGE bug that chooses the wrong resolution, of if you execute the game in compatibility mode with the option “run on 640x480 resolution mode”. These are harder to fix, so it’s best to give the player an option to set their own resolution inside the game.
When to use a launcher? Sometimes games crash on full-screen, or on a certain resolution. This means that even if you give the player the option to choose from inside the game, if he can’t even start the game (because it crashes) he won’t be able to play at all. Here is where a launcher comes useful. With a launcher you can configure this settings BEFORE launching the game, and therefore fix the problem. Be wary though, because most “launchers” you’ll find in this forums are actually made with BGE and therefore useless for this purpose. In your case I don’t think you need a launcher. If in desperate needs you can always indicate the user the proper command to launch the game with the needed options.
P.S: Make sure you have not messed with the camera settings though. For example, make sure your camera’s “Custom Viewport” panel is disabled.
Thanks just changed it to scale and that fixed it.