Doom3world

The world is yours! Doom 3 - Quake 4 - ET:QW - Prey - Rage
It is currently Tue May 21, 2013 11:32 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Resolution detection for menu - how?
PostPosted: Wed Jun 20, 2012 6:51 am 
Offline
did just hit his 750th monster

Joined: Mon Jan 01, 2007 5:13 am
Posts: 846
Location: TX, US
I noticed stock Doom has 4:3 limited set of resolutions, as if it doesn't do autodetection. Is there such function in the game to detect resolutions? Would it be possible to use it via script?


Top
 Profile  
 
 Post subject: Re: Resolution detection for menu - how?
PostPosted: Wed Jun 20, 2012 12:10 pm 
Offline
fired 300 rounds
User avatar

Joined: Sun Jul 13, 2008 1:24 pm
Posts: 392
r_customWidth "x"
r_customHeight "x"
r_mode "-1"
r_aspectRatio "x" (Where X is 0 = 4:3, 1= 16:9, 2 = 16:10)

_________________
Lead Designer, Team Blur Games
Visit The [TBG] User Forums


Top
 Profile E-mail  
 
 Post subject: Re: Resolution detection for menu - how?
PostPosted: Wed Jun 20, 2012 6:59 pm 
Offline
did just hit his 750th monster

Joined: Mon Jan 01, 2007 5:13 am
Posts: 846
Location: TX, US
Yeah, but that's not what I am talking about. There are built in function in DarkPlaces (and many other engines) that pulls list of supported resolutions for the system the game is running on. That list can be used to display in the menu. So when user runs the game, he sees all available resolutions and aspect ratios (all that can be sorted and showing only 16:9 aspect resolutions when in fullscreen mode on 16:9 screen, for example). Is there anything like that in Doom 3 ?


Top
 Profile  
 
 Post subject: Re: Resolution detection for menu - how?
PostPosted: Wed Jun 20, 2012 7:18 pm 
Offline
Very Senior Forum Poster
User avatar

Joined: Sun May 29, 2005 10:02 pm
Posts: 7071
Location: Here, not there.
Not sure, but I think Grimm added more resolutions to the menu.

_________________
Fuzzy Logic Inc
PAINTBALL DOOM 3!!!!
Check out my Q2 server! q2server.fuzzylogicinc.com :D
Doom 3, Paintball! d3server.fuzzylogicinc.com


Top
 Profile E-mail  
 
 Post subject: Re: Resolution detection for menu - how?
PostPosted: Wed Jun 20, 2012 8:21 pm 
Offline
Last man standing
User avatar

Joined: Tue Feb 22, 2005 4:59 pm
Posts: 1060
Location: In The Zone
motorsep wrote:
Yeah, but that's not what I am talking about. There are built in function in DarkPlaces (and many other engines) that pulls list of supported resolutions for the system the game is running on. That list can be used to display in the menu. So when user runs the game, he sees all available resolutions and aspect ratios (all that can be sorted and showing only 16:9 aspect resolutions when in fullscreen mode on 16:9 screen, for example). Is there anything like that in Doom 3 ?

No there is nothing like that in d3

_________________
http://www.the-emz.com/ - A Multiplayer Mod for Doom 3


Top
 Profile  
 
 Post subject: Re: Resolution detection for menu - how?
PostPosted: Wed Jun 20, 2012 8:39 pm 
Offline
did just hit his 750th monster

Joined: Mon Jan 01, 2007 5:13 am
Posts: 846
Location: TX, US
Ouch. Does it have to be written as an engine component or can it be created in C++ game code (function to detect available resolutions)?


Top
 Profile  
 
 Post subject: Re: Resolution detection for menu - how?
PostPosted: Wed Jun 20, 2012 8:49 pm 
Offline
Invisibility
User avatar

Joined: Fri Aug 13, 2004 4:39 pm
Posts: 3654
Location: Right there! Look!
The Happy Friar wrote:
Not sure, but I think Grimm added more resolutions to the menu.

No. I am working on it though, the trick is to be able to exec a configuration, or a series of commands based on a string value.
D3 cannot 'enumerate' the available resolutions, but that easy to do in the SDK for a programmer, I can't 'program' in the SDK so I always opt for GUI/script solutions. With our current hardware and CPU strength I don't see any issues with scripting performance, as long as you use your head and time your stuff wisely.

The resolution stuff in the gui is set up like this:

Code:
         choiceDef socScreenSize {
            rect      240, 75, 120, 15
            backcolor    0.1,0.1,0.1,0.4
            choices      "#str_04222"//320x240;400x300;512x384;
            values      "3;4;5;6;7;8"//0;1;2;
            cvar      "r_mode"
            updateGroup   render
            choiceType   1
            font      "fonts/Chiller"
            textscale   0.32
            //textalign   1
            textaligny   -6
            forecolor   1, 0.7, 0.6, 1
         }

#str_04222 is just a string in the strings file that reads "640x480;1024x768....etc..etc.."
When you click the choicedef it sets the cvar to whatever corresponding value you set in the 'values' option of the choicedef, in this case r_mode.
The issue there is that for alternative modes to work (any widescreen mode), you need to set r_mode to -1.

So without SDK work, I am thinking of a way I might fix this.
I am going to try to extend the values to the #str_04222 and not map it to r_mode at all.
Instead I'll map it to a local variable in the GUI, and use an event to catch changes to this variable.
Then depending on these changes I'll simply set three hidden c_var choicedefs that are bound to r_mode, r_customwidth and r_customheight. That ought to do it.

_________________
Check out GRIMM Quest for the Gatherer's Key!
Grimm's Youtube Channel

Follow Grimm Quest on Twitter!


Top
 Profile E-mail  
 
 Post subject: Re: Resolution detection for menu - how?
PostPosted: Thu Jun 21, 2012 1:04 am 
Offline
The first 10 posts have been the best...

Joined: Sun Jun 10, 2012 3:09 am
Posts: 14
Have you seen how the render selection is handled in Endarchy? That was the best that I could come up with, with just guis.

There are two guis, the first is part of the main menu, the second is in-game. I highly suggest having a quick look at it.


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group