Setting max supported resolution.
by Dawid Zwiewka · in Torque 2D Beginner · 03/19/2013 (8:22 am) · 4 replies
Hi!
I'd like to make my game working on max supported resolution but I don't know how to do it... I found funcions getResolutionList, and setScreenMode which I think should be good but there is no function "getDefaultDisplayDevice" or I can't find it. I can get a list of all available devices but how can I know which of them is currently in use and is default?
And how to get the higher supported resolution from the list returned by getResolutionList()? It should be the last element but how can I count them? Just like that?
PS. What is better? Making game 4:3 or 16:9? Fill the rest of screen with some frame or stretch the screen if someone is using my 16:9 game on 4:3 monitor?
PS2. Sorry for making so many threads and asking so many questions. I must be annoying for you guys but I don't know where else could I get answers if I spent hours for searching documentation and still don't know what to do :(
I'd like to make my game working on max supported resolution but I don't know how to do it... I found funcions getResolutionList, and setScreenMode which I think should be good but there is no function "getDefaultDisplayDevice" or I can't find it. I can get a list of all available devices but how can I know which of them is currently in use and is default?
And how to get the higher supported resolution from the list returned by getResolutionList()? It should be the last element but how can I count them? Just like that?
%list = getResolutionList(...); setScreenMode(%list.count()-1);//I think I should firstly convert %list[%list.count()-1] to array width,heigh,deepth, right?Can I anywhere find examples of functions in documentation? It's hard for my, new user, understand how everything works just with looking at description :(
PS. What is better? Making game 4:3 or 16:9? Fill the rest of screen with some frame or stretch the screen if someone is using my 16:9 game on 4:3 monitor?
PS2. Sorry for making so many threads and asking so many questions. I must be annoying for you guys but I don't know where else could I get answers if I spent hours for searching documentation and still don't know what to do :(
About the author
I'm not from UK/USA so I'm sorry in advance for all grammatical mistakes :)
#2
03/19/2013 (3:08 pm)
Thanks, I found what I was looking for. Now I only have to take a closer look at it to understand everything :)
#3
I would advise against making the game look worse when played in a better ratio. Typically people buy widescreens to make their games look BETTER, not worse.
I'd imagine people with smaller ratios like 4:3 are more likely to accept the fact they lose some gameplay real estate since they aren't widescreen. It's not the game punishing them, but their older monitor. Something I'd think would be more acceptable among players, since it is unrealistic to expect developers to cater towards older hardware while punishing newer hardware users.
Anyone who says the stretching from 4:3 to 16:9 doesn't matter, has no idea what they're talking about. It will always look worse smushed, stretched, scaled, etc. The more you change it from the original artwork, the more it will look worse. Especially if you have a quality artist or detailed artwork or properly proportioned assets (like a non-cartoon humanoid character).
Framing is something that some games can get away with though. So giving a 4:3 game screen with a frame or more GUI for 16:9/16:10 users isn't always a bad idea.
It really depends on the game, but I'd always argue in favor of supporting the larger ratio's and resolutions. Nothing is more annoying for me than a game that looks bleh or isn't supported by my 1920x1200 resolution/ratio. Well, besides obviously horizontally stretched graphics.
03/19/2013 (7:01 pm)
Well when you figure it out, be sure to share what in the documentation you used so the rest of us can have an easier time understanding how to do it :PI would advise against making the game look worse when played in a better ratio. Typically people buy widescreens to make their games look BETTER, not worse.
I'd imagine people with smaller ratios like 4:3 are more likely to accept the fact they lose some gameplay real estate since they aren't widescreen. It's not the game punishing them, but their older monitor. Something I'd think would be more acceptable among players, since it is unrealistic to expect developers to cater towards older hardware while punishing newer hardware users.
Anyone who says the stretching from 4:3 to 16:9 doesn't matter, has no idea what they're talking about. It will always look worse smushed, stretched, scaled, etc. The more you change it from the original artwork, the more it will look worse. Especially if you have a quality artist or detailed artwork or properly proportioned assets (like a non-cartoon humanoid character).
Framing is something that some games can get away with though. So giving a 4:3 game screen with a frame or more GUI for 16:9/16:10 users isn't always a bad idea.
It really depends on the game, but I'd always argue in favor of supporting the larger ratio's and resolutions. Nothing is more annoying for me than a game that looks bleh or isn't supported by my 1920x1200 resolution/ratio. Well, besides obviously horizontally stretched graphics.
#4
I got another idea of making 2 versions of game.
[img src="http://s23.postimage.org/sadoixmij/szkic.png"][/img]
Lets say that green area is main playable area. Blue is menu, points, buttons for 4:3 ratio and red for 16:9. About 16:10 I would just put some frame at the top and bottom of the screen and use the rest like 16:9.
About script:
I found usefull code in sandbox/1/scripts/toolbox.cs in function initializeToolbox()
I didn't try to use it yet but after looking at it I think it's something I need to change resolution to highest supported.
03/20/2013 (8:04 am)
Of course I wouldn't stretch from 4:3 to 16:9... If I ever stretched something it would be from 16:9 to 4:3 because much more people got 16:9 monitors.I got another idea of making 2 versions of game.
[img src="http://s23.postimage.org/sadoixmij/szkic.png"][/img]
Lets say that green area is main playable area. Blue is menu, points, buttons for 4:3 ratio and red for 16:9. About 16:10 I would just put some frame at the top and bottom of the screen and use the rest like 16:9.
About script:
I found usefull code in sandbox/1/scripts/toolbox.cs in function initializeToolbox()
I didn't try to use it yet but after looking at it I think it's something I need to change resolution to highest supported.
Associate Mike Lilligreen
Retired T2Der
The sandbox module supports changing between multiple resolutions. It is one of the examples you can look at. For your specific questions, I would have to do some digging on that myself.