Full Screen issues
by George Ison · in Torque Game Builder · 10/27/2012 (1:22 pm) · 11 replies
Hello all,
I have a silly question so please forgive my ignorance. I have something that's slightly annoying in our latest title. We are scheduled to hand off to publishers November 26th and we are putting the final "polish" elements in place and one thing that we found rather annoying, not really an issue per'se but aggravating is that when we allow the player to choose between windowed mode and full screen we have black space appear on each side of the full screen mode. Now I understand obviously why this is, the question is how can I fill this area with an image, rather than just leave it black. I am either seriously overlooking a method within the engine to fix this or their isn't one. Does anyone have any ideas?
If I have not made myself clear on the issue just let me know and Ill try again :-)
Thanks in advance!
I have a silly question so please forgive my ignorance. I have something that's slightly annoying in our latest title. We are scheduled to hand off to publishers November 26th and we are putting the final "polish" elements in place and one thing that we found rather annoying, not really an issue per'se but aggravating is that when we allow the player to choose between windowed mode and full screen we have black space appear on each side of the full screen mode. Now I understand obviously why this is, the question is how can I fill this area with an image, rather than just leave it black. I am either seriously overlooking a method within the engine to fix this or their isn't one. Does anyone have any ideas?
If I have not made myself clear on the issue just let me know and Ill try again :-)
Thanks in advance!
About the author
Love to engineer and develop just about anything. Our primary focus though is that of computer games and software tools.
#2
10/27/2012 (8:37 pm)
Essentially yes, what happens it t2d is trying to maintain the aspect ratio for example; lets say the game was developed in 1024 x 768 but the person playing it is on a wide screen. It will be enlarged as much as possible until it can no longer maintain the aspect ratio. Therefore the void around it is filled with black rather than stretching your art out of proportion. Some of our competitors fill this area in with an image or frame. Hence my problem, I cannot find a way to do this in t2d.
#3
10/28/2012 (12:21 am)
I have exactly the opposite issue. I want those black parts to be there when a user hits full screen instead of stretching the game window to full extent.
#4
10/28/2012 (9:39 am)
HMmm, seems like you both should post your fullscreen code and swap. :)
#5
If you look at game/gui/<whatever>.gui, you'll see a GuiControl with a scene window as a child. I added two GUIBitmapCtrl's as children and when the user goes to fullscreen, I manually adjust those (just like the main scene window) to fit against the two sides.
Beware! Some monitors will end up creating black bars across the top and bottom.
If you need some help using the GUIBitmapCtrl object, just let me know and I can help some more.
10/28/2012 (12:32 pm)
The easiest way I've found to do this involves using the GUI system (which can be hard for some people not familiar with it).If you look at game/gui/<whatever>.gui, you'll see a GuiControl with a scene window as a child. I added two GUIBitmapCtrl's as children and when the user goes to fullscreen, I manually adjust those (just like the main scene window) to fit against the two sides.
Beware! Some monitors will end up creating black bars across the top and bottom.
If you need some help using the GUIBitmapCtrl object, just let me know and I can help some more.
#6
We are not using any customized code for this, basically as simple as switching the Full-screen global on or off. So this appears to be default behavior.
We are just trying to come to a solution with the inconsistencies now and for our future games.
10/28/2012 (12:56 pm)
I will mess about with the GUI system a bit to see if I can come to some resolve. Taking Vlads statement into consideration here, I have noticed though and I don't know why is that depending on what it is, sometimes torque ignores the aspect ratio like Vlad indicated and just stretches it. This appears to be related to screen type and size. For example, my laptop is 1920x1080 and I am presented with the black bars. My external monitor is a 27" 1920x1080 as well, yet Torque tries to fill the entire monitor. It goes without saying, 1024x768 stretched to fit 1920x1080 looks a bit off...lol.We are not using any customized code for this, basically as simple as switching the Full-screen global on or off. So this appears to be default behavior.
We are just trying to come to a solution with the inconsistencies now and for our future games.
#7
I have 1680*105 screen res., widescreen 20 inch. monitor and on my laptop 1280*800 res., widescreen 15 inch. screen.
The game's resolution is 1024*768. On both machines I have screen stretched out to the full extent in full screen mode.
10/28/2012 (9:16 pm)
George, it looks like Torque follows it's own pre-scripted path with a list of resolutions of the game and monitors.I have 1680*105 screen res., widescreen 20 inch. monitor and on my laptop 1280*800 res., widescreen 15 inch. screen.
The game's resolution is 1024*768. On both machines I have screen stretched out to the full extent in full screen mode.
#8
William I am familiar with the system, I dont use it unless I have to, we usually use the class callbacks and mouse events to create our own systems but given your advice, I'm trying to understand what your doing here. If you don't care and have a moment could you please elaborate on your method before I go off on a wild goose chase through the API ....lol :-)
Vlad I couldn't help but notice in your profile you are an artist. Would love to see some of your work.... :-)
10/28/2012 (10:07 pm)
Looks like we will have to control it manually like William suggests as its just not consistent enough for production use. I will have to rummage through the reference docs and see whats available to allow some real screen manipulation.William I am familiar with the system, I dont use it unless I have to, we usually use the class callbacks and mouse events to create our own systems but given your advice, I'm trying to understand what your doing here. If you don't care and have a moment could you please elaborate on your method before I go off on a wild goose chase through the API ....lol :-)
Vlad I couldn't help but notice in your profile you are an artist. Would love to see some of your work.... :-)
#9
10/28/2012 (10:48 pm)
Here are some of my very old works 2009 , since then I don't do any freelance or take any job. I started on my own making games, still working on my first game, which hopefully will be ready in about 4-5 months.
#10
In addition, you'll need to add 2 GUIBitmapCtrl's to the main ".gui" in your game/gui directory. One option is to put them behind the scene window (above the scene window in the ".gui" file).
In my example, you'll want to modify the "setAcceptableScreenRatio" to manipulate the 2 GUIBitmapCtrl's manually to set them to the sides. In the case of a widescreen, you can place them at (0,0) with a size of (%newX,%screenHeight) and at (%newX+%newWidth,0) with the same size as the other.
Let me know if you run into problems. I'll be glad to help!
10/29/2012 (8:28 am)
I have an example here of [url=http://www.garagegames.com/community/forums/viewthread/97019/1#comment-651307]how I handle the canvas resizing.In addition, you'll need to add 2 GUIBitmapCtrl's to the main ".gui" in your game/gui directory. One option is to put them behind the scene window (above the scene window in the ".gui" file).
In my example, you'll want to modify the "setAcceptableScreenRatio" to manipulate the 2 GUIBitmapCtrl's manually to set them to the sides. In the case of a widescreen, you can place them at (0,0) with a size of (%newX,%screenHeight) and at (%newX+%newWidth,0) with the same size as the other.
Let me know if you run into problems. I'll be glad to help!
#11
11/02/2012 (8:25 am)
There is an option to fill/maintain image ratio with pretty much every display and graphics card out there. I've found, after trying three different approaches, one more intricate than the other, it is better to leave player with whatever settings are set for that machine. It is not up to us to decide how it should be, nor ot is efficient to put work into and fix what's working the way it was intended to already. Or that's the way I see it.
Torque Owner Kevin James