Tile sizes & view limit
by John Coyne · in Torque Game Builder · 01/22/2006 (5:11 am) · 5 replies
Hi
I'm making an 8 way scrolling map for my game, on a map thats 2 screens tall and wide. Trouble is setting the view limit and the tile size, i'm not sure what the recommended tile size is, i'm using 10 just now. How do i figure out the tile size and number of tiles to get the correctly sized map, and how should i set the view limit. Just now it seems a lot of trial and error. Also, will there be problems later when someone using a different screen resolution runs the game?
I'm making an 8 way scrolling map for my game, on a map thats 2 screens tall and wide. Trouble is setting the view limit and the tile size, i'm not sure what the recommended tile size is, i'm using 10 just now. How do i figure out the tile size and number of tiles to get the correctly sized map, and how should i set the view limit. Just now it seems a lot of trial and error. Also, will there be problems later when someone using a different screen resolution runs the game?
About the author
Torque Owner Michael Woerister
You can set the area the camera view with t2dSceneWindow::setCurrentCameraPosition(%pos, %size).
E. g. you do SceneWindow2D.setCurrentCameraPosition("0 0", "100 75") and have a tile-size of 10x10 then there would 10x7,5 tiles be shown per screen. If you're tilemap was 20x14 tiles, that would be what you wanted.
You can then set the view-limit to the size of your map:
It is always recommended that the width and height ratio of your camera is the same as the one of the t2dSceneWindow. Otherwise things will get stretched or squashed.