HDTV screen resolution / PC screen
by Andy S. · in Torque X 2D · 12/15/2007 (5:54 am) · 4 replies
I want my game to run on a pc as well as on a HDTV. How do i have to set up the game & GUIs so that it is resolution-independant? I don't want to have a letterbox on the widescreens. I am trying for days now to achieve this, but always something is squashed or does not display correctely. I am working with Torque 1.0, not the new beta. Please help ;-)!
#2
Do you want letter box/curtains ever? Or do you want two different native resolutions? Many games are formatted as 4x3 for the PC and then add "side curtains" for HDTV, while other games format for 16x9 and then "letter box" for 4x3 (or just size the window to 16x9). So the real question is do you want to format the game once for both display dimensions, or to detect which mode you are in and then choose the appropriate GUI screen.
If you want to optimize one GUI for HDTV, it seems like you should be able to create your game GUI screens for a 16x9 format, such as 1280x720. Then, in your GUI screen's GuiStyle, set the PreserveAspectRatio property to true. I think that should prevent the squishing effect.
However, if you want two different screens - like an Xbox 360 game that fills an HDTV screen and also fills a Standard Definition TV (without letterbox) then you can probably create 2 different GuiScreens, each with a different bitmap size, and then load the appropriate screen at runtime based on the detected screen dimensions. Try something like this....
Try out both options and see what works best. Again, I don't have access to my console :( so I would be very interested in hearing back what you find. Good Luck.
John K.
12/22/2007 (8:04 am)
I haven't tried this yet (and can't test on the Xbox 360 while I'm out of the country), but here are some thoughts for you to consider. Do you want letter box/curtains ever? Or do you want two different native resolutions? Many games are formatted as 4x3 for the PC and then add "side curtains" for HDTV, while other games format for 16x9 and then "letter box" for 4x3 (or just size the window to 16x9). So the real question is do you want to format the game once for both display dimensions, or to detect which mode you are in and then choose the appropriate GUI screen.
If you want to optimize one GUI for HDTV, it seems like you should be able to create your game GUI screens for a 16x9 format, such as 1280x720. Then, in your GUI screen's GuiStyle, set the PreserveAspectRatio property to true. I think that should prevent the squishing effect.
However, if you want two different screens - like an Xbox 360 game that fills an HDTV screen and also fills a Standard Definition TV (without letterbox) then you can probably create 2 different GuiScreens, each with a different bitmap size, and then load the appropriate screen at runtime based on the detected screen dimensions. Try something like this....
if (GarageGames.Torque.GFX.GFXDevice.IsWideScreen(
Game.Instance.Window.ClientBounds.Width,
Game.Instance.Window.ClientBounds.Height))
{
//show HDTV GuiScreen with a 1280x720 Bitmap
GUICanvas.Instance.SetContentControl("MenuScreenHD");
}
else
{
//show Standard GuiScreen with a 1024x768 Bitmap
GUICanvas.Instance.SetContentControl("MenuScreen");
} Try out both options and see what works best. Again, I don't have access to my console :( so I would be very interested in hearing back what you find. Good Luck.
John K.
#3
12/22/2007 (10:56 am)
John thanks a lot! i will try as soon as i get back to my pc again (christmastime...;-))! For sure let you know anyway.
#4
Next step is now to place the buttons in clever way so that it looks good on widescreen and on standard TV.
Thanks a lot again!
12/22/2007 (12:02 pm)
JOhn, just had the opportunity to try out. I solved it buy loading/using a widescreen bitmap for the GUI's style if the game detects that it runs on a widescreen. Works perfect, no more letterboxing ;-)!Next step is now to place the buttons in clever way so that it looks good on widescreen and on standard TV.
Thanks a lot again!
Torque Owner Andy S.
Default Studio Name