force full screen

(awesreeker) #1

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.

(Nemescraft) #2

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.

(awesreeker) #3

You can change the resolution in my game will thqt effect this

(awesreeker) #4

Yeah that does not work

(Cotaks) #5

try python

from bge import render

see my game launcher (sig) for more options.

(awesreeker) #6

For whatever reason and I have tried this before but using code to set fullscreen or wondowed does not work at all

(Cotaks) #7

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.

(awesreeker) #8

I have done that before, is there anything I need to do in regards to logic bricks to get that working

(Cotaks) #9

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

(awesreeker) #10

Welp now this happens, which is arguably worse…

(elmeunick9) #11

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.

(awesreek) #12

Thanks just changed it to scale and that fixed it.