Game Development Community

You guys preferred canvas size to work with as a base?

by KainXiorcal · in Torque X 2D · 05/19/2010 (3:01 pm) · 16 replies

Hep!
I was just wondering, since the screen resolution is sort of stretch-to-fit when a game is played, it might seems irrelevant what canvas size the artist works with to make his graphics, but he still has to start somewhere.

I was just wondering what image/canvas size you guys like to work with (the canvas here is representing the entirety of a game's screen)?

Also, would you rather work with a huge canvas and the final result is a shrunken down version, or work with a smaller canvas and the final result is enlarged? (I would think the former to allow more details; plus, if it's the second option, enlarged graphics would look ugly on PCs and TV screens with a big resolution. But I'm not sure.)

Other input and tips on the subject also appreciated. :)

#1
05/19/2010 (3:02 pm)
1280x720 from beginning to end.
#2
05/19/2010 (5:06 pm)
Check out this link

TXB settings
#3
05/19/2010 (9:14 pm)
Awesome, thanks!
#4
05/19/2010 (9:32 pm)
heh I guess you got my answer
#5
05/20/2010 (7:20 am)
1280x720 or whatever my target resolution is.
#7
07/13/2010 (12:16 pm)
Henry: yes, and it was very descriptive and informative as well! Thanks!
Thanks to every one for your answers!

I have another question related to this:
will everything appearing in the 1280x720 screen appear on every tvs?
I was thinking, maybe the edges will be cropped out in some cases, so I wonder how much pixels away from each sides should any HUD elements be?
HUD is very important, so I don't want it to be slightly "out of screen"!
#8
07/13/2010 (12:52 pm)
Xbox will automatically letterbox it on SD TVs. As for viewable area, well that varies across different TVs. You will need to pay attention the the 'safe areas' en.wikipedia.org/wiki/Safe_area

Torque/XNA have some safe area information built in, and Torque X can render the safe areas for you so you can see them onscreen - have a dig around in GUISceneview.
#9
07/13/2010 (1:53 pm)
Hi,

let me add my 2 cents. Torque X lets you define all via the level file so you are almost free from the aspect ratio problem (letterboxing looks terrible so is to be avoided and if you want to try to submit your game to XBLA SDTV support is mandatory). The best pipeline I've found is as follows:

I ask my artist to create any aspect ratio sensitive screen back in both resolutions: 800x600 and 1280x720. This is valid for splash screens and any backdrop that must fit the whole play area without being cut.

All the remaining assets are all worked using a 1280x720 resolution. I prepare my levels all in 16:9 till they are actually finished.

Once my game is fully functional in 16:9 I make a copy of all the levels adding TV to their name so I'll have level01.txscene and level01TV.txscene. Now I edit themin a text editor reducing all the sizes by a 35%, so, for instance, a static sprite sized 9.6x7.2 in 16:9 becomes 6.24x4.68. Having this done I open the levels and change the camera view to 800x600 and make the needed adjustments to have a good level in 4:3 as well.

The above pipeline has proved to be very good and easy to manage. The only code implementation for this is to define a global static field in the Game, I call it AspectControl. Its value is "" if the game runs in 16:9 and "TV" otherwise, so all I have to do is to chain this field in the level name in every level Load call:

SceneLoader.Load(@"data\levels\level01" + AspectControl + ".txscene");

That's what I call a Zero Impact implementation ;)

Hope this helps.
~Pino
#10
07/13/2010 (2:08 pm)
Doh, you are right! >_< TX shows 2 rectangles, one of them was obviously the safe area! >_<

I'll have to run some tests though to see how much ~pixels that entails in a 1280x720 format.

Thanks Duncan!
#11
07/13/2010 (10:01 pm)
Thanks Giuseppe! (I hadn't seen your reply because I didn't refresh the page before posting)

So you're saying that games should have these two aspect ratio built in. If I understand correctly, the way it is handled is merely by codes -- the sprites are resized by codes and thus you don't have to have the same sprite twice, imported at a different size (which would increase the filesize like a madman).

My only question now is: is that level Load call code detected automatically by the game depending on the display screen, or is it something that the user have to select manually (such as in an Option screen)?

Thanks!
#12
07/13/2010 (10:26 pm)
Yes, I strongly advice to support 16:9 and 4:3 (at least!). If the end-user has the Xbox connected via VGA cable he will be able to use many other aspect ratios (5:3, 5:4 and 8:5), but they are not mandatory to support, still it could be a good idea because VGA cables are quite common and if you are planning also a PC deployment then you'll have to ;)

It's not up to the user (at least not on the Xbox): you have the info in the GraphicDevice once it's initialized. This is the piece of code I use (in the Game.cs file):

int BufferWidth = 0;
        int BufferHeight = 0;
        public static string AspectControl = "";

        protected override void LoadContent()
        {
            if (_graphicsManager.GraphicsDevice.DisplayMode.Height < 720)
            {
                BufferWidth = 800;
                BufferHeight = 600;
                AspectControl = "TV";
            }
            else
            {
                BufferWidth = 1280;
                BufferHeight = 720;
                AspectControl = "";
            }

            _graphicsManager.PreferredBackBufferWidth = BufferWidth;
            _graphicsManager.PreferredBackBufferHeight = BufferHeight;
            _graphicsManager.ApplyChanges();
            base.LoadContent();
        }

If in the game logic you have some explicit screen coordinate then you have to check this variable (AspectControl) to decide where to draw (this is needed just with the GUI controls if you are using those).

Cheers,
Pino
#13
07/14/2010 (2:12 am)
Thanks Pino, I'm taking note of all this info! It's great that it's detected automatically via code!
I wonder if this info is touched upon in the "Complete Guide" book...

Anyway, I checked for the "how much ~pixels that entails in a 1280x720 format" and it's a border of about 128 pixels from the left and right edges, and about 72 pixels from the top and bottom edges. This will help for mocks-up that decides the (relative) size of certain HUD elements relatively to the whole screen. :)
#14
07/14/2010 (2:46 am)
128x72. which translates perfectly to 1280X720 format, for 10 pixels to one world unit.
#15
07/14/2010 (3:18 am)
Hot damn, haha! I didn't even notice that similarity! XD I actually screenshoted the borders in debug mode and checked them in Photoshop... Indeed, the size of the safe-area borders is the same as my canvas/camera size! (128x72)

So... that means the "safe-zone" is 1024x576 in the center of the canvas...
This is such a mind-number... in one hand, you want players to see everything they ought to see, in the other, you want to use the space you have to it's full potential...
#16
07/14/2010 (1:05 pm)
Well if the Xbox is connected to a TV it'll suffer some overscan and some TV have a very strong one so it makes sense to preserve that 10%.

To use the most possible space you might want to use a more extended test differentiating the platforms as well (#IF !XBOX ... #else ... #endif) and prepare more scene files, like level01XBOX_16_9, level01XBOX_SDTV, level01PC_16_9 and so on... this way you can use the whole space on the PC and keep the safe zone on the Xbox only. All depending on how much well you want your game to play on different platforms and resolutions.