Game Development Community

Level builder/game resolution

by Ben Hickling · in Torque Game Builder · 06/24/2006 (3:09 pm) · 2 replies

I want to have my game running in a 640x480 window, but I don't want to have to use the level builder in that size window as its obviously a very small amount of space to work in. Is there a way I can have the level builder run at a decent screen size but have my game run in a different resolution when I click the 'play level' button?
If I have the window size set to the highest possible which is 960 x 600 in my desktop resolution of 1027 x 768 (yeah I know, I need a new monitor!), then when I run the level, everything is scaled to fit the 960 x 600 resolution when the level size is only ment to be 640 x 480, meaning everything is stretched horizontally.

If anyone knows of a workaround for this, I would be most greatful!

Thanks!

#1
06/24/2006 (3:24 pm)
I don't have an answer for you, but it would be a great addition.
#2
06/24/2006 (4:06 pm)
In YourGame/main.cs

Before ToggleLevelEditor()

set your "editing resolution"

setScreenMode(1024,768,32,0);


Then in YourGame/gameScripts/game.cs
set your "running" resolution
in the startGame() function
setScreenMode(640,480,32,0);

endLevel() in the same game.cs file
set it back to your "editing resolution"
setScreenMode(1024,768,32,0);

*its worth noting if you use a resolution not supported by your card, you will crash!

Enjoy!