Screen-Res
by yurembo · in Torque 2D Beginner · 11/05/2013 (12:51 am) · 2 replies
Hello all!
I develop a game for 1280 x 800 screen-resolution. My rectangle textures are widen by X-axis.
How can I resolve this task?
Mobile devices have many others screen-resolutions.
Could I prepare different size pictures to different resolutions?
I develop a game for 1280 x 800 screen-resolution. My rectangle textures are widen by X-axis.
How can I resolve this task?
Mobile devices have many others screen-resolutions.
Could I prepare different size pictures to different resolutions?
About the author
Torque fan
#2
11/06/2013 (4:40 am)
You don't have to prepare different size pictures to different resolutions .. you could handle this easily:// get info on current device's resolution %res = getDesktopResolution(); $desktopWidth=getWord(%res,0); $desktopHeight=getWord(%res,1); $bpp=getWord(%res,2); // set screen resolution setScreenMode($desktopWidth , $desktopHeight , $bpp, $fullScreen); // depending on the aspect ratio of the current resolution we set our camera size %ratio=$desktopWidth/$desktopHeight; if (%ratio>1.34) mySceneWindow.setCameraSize(120, 75); else mySceneWindow.setCameraSize(100, 75);
Torque Owner Richard Ranft
Roostertail Games
Currently you probably have something like
You'd probably rather use something like