Game Development Community

Fullscreen Resolution Change Problem

by Vladan Markovic · in Torque Game Builder · 11/07/2011 (2:02 pm) · 2 replies

Hi,

My game resolution is 1152 x 720, and i am using "relative" parameter in my GUI controls.
I am switch back and forth fullscreen / window mode in my game, and i noticed two problems.

Problem One:
1. Windowed size of game is 1152 x 720.
2. Switch to fullscreen , game is automatically set to 1280 x 720 (which is ok since i don't have 1152 x 720 on my monitor)
3. [PROBLEM] Switch back to window mode, the game is not re-sized back to default 1152 x 720, instead it keeps 1280 x 720 resolution.
4. I am calling setScreenMode(1152,720,32,0); to set the resolution right in window mode, and that's where problem two starts.

Problem Two:
Calling function setScreenMode(1152,720,32,0)
It seems that GUI elements shift from their original position for about 1 pixel every time i call setScreenMode(1152,720,32,0).
[PROBLEM] After 4~5 times the GUI (HUD) of the game is totally messed up.


Any help or reference to some article that might shed some lights on the problem is welcome,
Thank You.

#1
11/07/2011 (3:32 pm)
Likely Problem Two Solution: Fixing GUI relative sizing
#2
11/08/2011 (7:33 am)
Seems like it might be what i am looking for,
ill look in to it.

Thank You William.