Resolution question
by Kevin James · in Torque Game Builder · 05/14/2010 (7:09 am) · 2 replies
How do I change the resolution so that I gain real estate within the game? I thought this would be simple: change resolution from 800 x 600 to 1024 x 768 and everything would get smaller, but obviously that didn't happen. The windowed size of the "game window" did not change either. I assumed (incorrectly) that resolution size would affect window size.
The alternative is that I have to manually shrink everything which will be a major pain.
The alternative is that I have to manually shrink everything which will be a major pain.
About the author
Computer security, digital forensics, and platform jumper enthusiast. shells.myw3b.net/~syreal/
Torque Owner Giuseppe Bertone
DGform s.r.l.
I'm not english native, so I can't understand what do you exactly mean with "real estate", but if you are trying to have a 800x600 centered game screen, regardless the sceen resolution so that the area over 800x600 will be back screen, you should work properly with guiControls and t2dSceneWindow object.
I.e. using a customGUI.gui like this one
%guiContent = new GuiControl(mainScreenGui) { canSaveDynamicFields = "0"; Profile = "GuiBlackContentProfile"; HorizSizing = "center"; VertSizing = "center"; Position = "0 0"; Extent = "800 600"; MinExtent = "8 8"; canSave = "1"; Visible = "1"; useVariable = "0"; new t2dSceneWindow(sceneWindow2D) { canSaveDynamicFields = "0"; Profile = "GuiContentProfile"; HorizSizing = "center"; VertSizing = "center"; Position = "0 0"; Extent = "800 600"; MinExtent = "8 8"; canSave = "1"; Visible = "1"; lockMouse = "0"; useWindowMouseEvents = "1"; useObjectMouseEvents = "1"; }; };will make your game have always a centered 800x600 area, even if your screen resolution is set to, i.e. 1024x768, 1440x900, 1600x1200, and so on
You can obtain the same result zooming out camera properly based on player current screen resolution.
I.e., to achieve the same result just described above (keeping a 800x600 game inside a bigger black canvas), starting with a camera at 100x75, you can set the camera to 128x96 when screen resolution is 1024x768, or set camera to 160x128 when screen resolution is 1280x1024, and so on.
Hope this info can be useful,
happy resizing to all.