Jump to content

Elite Force Custom resolution.


  • You cannot reply to this topic

5 replies to this topic

#1 Martin Thompson

Martin Thompson

    Member

  • Members
  • 125 posts

Posted 14 April 2010 - 10:23 AM

Hi guys,

It's me, Com-man for those who know me as him.

I've got yet another question. In RPG-X, you guys changed the code to
be able to set your game to widescren resolutions. I was wondering
if this is also possible with the Single Player code.

I've had a look into the bit that sets the resolution, but everything
you do in SP is set a console command to a number (for example, 8 is 1600x1200) and I can't access any of the GL command as far as i can see
since they are all in the .EXE which i obv. dont have the source code off.

So I was wondering how this was done in RPG-X? Is the HM source code more
flexible or is there a workaround?

#2 GSIO01

GSIO01

    UberGames Developer

  • UberGames Developer
  • 1,021 posts

Posted 14 April 2010 - 11:13 AM

Well it's quite simple, the engine supports any screen resulution but has some predefined ones.

To use custom screen resolution you simply have to set r_mode to -1.
Then there are r_customwidth, r_customheight and r_customaspect (or it is r_custompixelaspect for EF as far as I remember).

So to add custom resolutions to SP you simple have to modifiy the UI and it's functions so it set's the correct values for each of the cvars for the player.

#3 Apprentice

Apprentice

    Mighty pirate!

  • Members
  • 558 posts

Posted 14 April 2010 - 01:35 PM

Taken from my autoexec.cfg:

seta r_mode "-1"
seta r_customwidth "1680"
seta r_customheight "1050"
seta r_fullscreen "1"
seta r_customaspect "1"
seta cg_fov "90"

Both singleplayer and multiplayer executables are running in 1680x1050 16:10 widescreen modus. For the 1680 and 1050, other values can be substituted depending what kind of screen you have (16:9, 10:10) and which resolution you want to use for the game . . .

#4 GSIO01

GSIO01

    UberGames Developer

  • UberGames Developer
  • 1,021 posts

Posted 14 April 2010 - 02:18 PM

The pixel aspect should be 1.6 for 16:10 (1680/1050 = 1.6).

#5 Martin Thompson

Martin Thompson

    Member

  • Members
  • 125 posts

Posted 14 April 2010 - 02:46 PM

Ah I see now, I didn't know you could set r_mode to -1, because in the code that number is a reference to an enum from which you can derrive the res based on the number (the names of the enum are the resolutions) but if you can also set r_mode to -1 this mean you can bascially get every resolution (up to a certain point). Thats verry helpfull. I always heard ppl talking about

seta r_customwidth "1680"
seta r_customheight "1050"

But i knew that r_mode determined the resolution, cuz if you have r_mode = 8, those custom resolutions dont do anything.

Well, thanks for the help, now i know how to do widescreen :)

FYI I'm asking this for the "Star Trek Freelance" single player mod, I'm the head (and only atm XD) coder and I've been looking my way trough the code and managed to do alot of stuff already, but i never figured out that you could set r_mode to -1, big help guys :)

#6 GSIO01

GSIO01

    UberGames Developer

  • UberGames Developer
  • 1,021 posts

Posted 14 April 2010 - 10:20 PM

Well it was quite obvious that screen resolution would go up in future and development is quite fast when it comes to hardware so it's just logical ID Software added such an option to ID Tech 3. Sad thing that not all Programmes that programm game engines keep such things into consideration, but most of the reseller engines have a way to set non standart resolutions in some way.

I suggest you grab the ID Tech 3 or ioQuake 3 Source as additional reference, you can look up a lot of engine side things there even though some things differ from EF of course.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users