Game Development Community

Camera vs Resolution

by Shaz · in Torque Game Builder · 08/17/2008 (3:11 pm) · 3 replies

On a new project, by default the camera is 100 x 75, and the design resolution is 800 x 600. Why is this? I don't really understand the significance of the camera size, because if I make a scene that's 800x600, I can see the whole lot when I play the game.

Adding GUI and Scene objects to the same window is a bit tedious because one uses the 100x75 (rather -50, -35.5 to 50, 35.5) and the other uses 800x600. Is there any reason I shouldn't change the camera width/height to 800x600 to make this process easier? Does it use more memory, make the game run slower, cause any other undesirable effects?

#1
08/17/2008 (9:09 pm)
100x75 is 100 world units wide, 75 units tall. You can find other threads about this and bin sizes, but the short of it is that a world unit size of 8x8 pixels is considered the sweet-spot. Too small, and it starts using more resources.
#2
08/18/2008 (2:57 pm)
Objects in TGB are displayed as a ratio, using World Units. Resolution is how many pixels the game takes up on the screen.

In other words, if you make an image that is 512x512 you might think it will be larger than your entire camera viewpoint, but in reality the image is scaled to be proportionate. The way you size something in your camera (100x75) will allow it to always look the same no matter what design resolution you're using.

The objects will always take up the same ratio/proportion of space. For example, with the default camera size of 100x75, each world unit (wu) will take up this many pixels for these design resolutions:

640x480: 6.4x6.4 pixels = 1wu
800x600: 8x8 pixels = 1 wu
1024x768: 10.24x10.24 pixels = 1 wu

Since the aspect ratio of 100x75 is 4:3, it scales perfectly to other 4:3 ratios (listed above) for design resolutions.

Another thing to note is that while in most other games, if you use a higher resolution you get to see more on the screen at once, it does not work this way in TGB. Higher resolution means you see exactly the same amount on screen, unless you specifically make your game to take advantage of different resolutions.

In summary, the way it is set up allows you to easily design the game once and have it look the same way at all standard 4:3 resolutions. This is why you should use graphics designed for larger resolutions. They will scale down to lower resolutions and still look good, but if you use graphics designed for 6480x480 and someone plays it on a 1024x768 resolution, it will be ugly.
#3
08/19/2008 (8:46 am)
So we should basically design scenes for the two widescreen aspects in addition to 4:3 resolutions? Got any neat tricks to make that easier?