Game Development Community

Rescaling t2dSceneWindow

by Very Interactive Person · in Torque Game Builder · 06/29/2008 (5:08 am) · 4 replies

First of all, I'm using TGB 1.3, if the problem I'm having is already fixed in newer versions of TGB, please let me know.

I'm trying to rescale t2dSceneWindow. The reason I want to do this is to keep the aspect ration of my game the same on wide screens. I'm adjusting the size of the t2dSceneWindows, then centering them. On widescreens, this results in 2 black borders next to the game, but at least the game isn't streched anymore, so everything looks nice.
BUT... turns out the mouse input is all screwed up after I do this. The mouse is still behaving as if the t2dSceneWindow wasn't resized. When I restart the game and resize before a level is loaded, then it works fine. But when the levels are already loaded, and I do a resize, the mouse is screwed up.
Is there an easy way to fix this? Or will I have to let the user restart the game if they select fullscreen mode (i'm only resizing in full screen mode)?

#1
06/30/2008 (4:30 am)
Hmm, no one?
#2
08/21/2008 (6:14 am)
Still haven't found a solution (other then restarting the game) :(
#3
08/21/2008 (11:00 am)
What are you doing to resize and center the game? Are you messing with the C++ source code? If so I don't think you need to.

In my options menu I call the function setScreenMode() and things seem to work as expected. I can change from fullscreen to windowed mode, change the screen resolutions, everything.
#4
08/22/2008 (10:51 am)
I'm also using setScreenmode(), but the game is still designed for 800*600, which means that on exotic screen resolutions the game is streched a little. This becomes very obvious if you have big round objects. So, I am correcting this by scaling the sceneWindow horizontally. That way I get 2 black strips on the side, but at least the game is no longer streched. This works fine, but it screws up the mouse input untill you restart.