Jump to content

Adding FOV Slider to Options


Jason Campbell

Recommended Posts

Not much of a resource but it seems that some players want this option and I've seen some complaints, 'Why no FOV options?'


Anyway it's real simple and only really adds the ability to raise the FOV, 9 above it's default from 65 to 74. It's 74 because any further and you see the end of the FPS arms. I chose the ability to go from 50 to 74 in the slider. It's easily altered from the GUI editor by clicking the slider and altering the range within the properties.


Step 1:


If you haven't altered your optionsDlg.gui, just replace your current file with the one from the download below. Back-up your current one, if you like.


FOV_Slider.zip

http://www.mediafire.com/download/ckzw497t2f84f7n/FOV_Slider.zip


Step 2:


Open game/art/datablocks/player.cs


in datablock PlayerData(DefaultPlayerData) find:

 

cameraDefaultFov = 55.0;
cameraMinFov = 5.0;
cameraMaxFov = 65.0;

 

and change it to this:

 

cameraDefaultFov = $pref::Player::currentFov;  // Change
cameraMinFov = 5.0;
cameraMaxFov = 75;  // Change

 

Step 3:


Open game/scripts/client/default.bind.cs find:

 

function turnOffZoom()
{
   ServerConnection.zoomed = false;
   setFov(ServerConnection.getControlCameraDefaultFov());
   Reticle.setVisible(true);
   zoomReticle.setVisible(false);
 
   // Rather than just disable the DOF effect, we want to set it to the level's
   // preset values.
   //DOFPostEffect.disable();
   ppOptionsUpdateDOFSettings();
}

 

and change it to:

 

function turnOffZoom()
{
   ServerConnection.zoomed = false;
   setFov($pref::Player::CurrentFOV);  // Change
   Reticle.setVisible(true);
   zoomReticle.setVisible(false);
 
   // Rather than just disable the DOF effect, we want to set it to the level's
   // preset values.
   //DOFPostEffect.disable();
   ppOptionsUpdateDOFSettings();
}

 


Hopefully that will do it. Load up a level and hit Ctrl-O and knock yourself silly with an almost useless slider!

Link to comment
Share on other sites

  • 2 years later...

I have a FOV slider as well in Uebergame and added eye offset so the first person hands ends are not visible, but the start to be visible still at over 100 FOV or so.

Default FOV should really be 90, since that is what most modern games use, 60-70 just looks bad.


We should really consider changing the default FOV to 90 and the resolution to a widescreen one since always opening a 4:3 window with 60 FOV just looks amateurish and so much different to what people are used to. The slider may also be useful.

Link to comment
Share on other sites

There is quite a lot of science behind FOV settings, in practice, this should be able to be set by default using discoverable data regarding platform and screen size particularly. In general, it's a first-person game problem, other game types don't have the same, of course, years of evolution later gamers have turned the science into an exploit and constantly widen the FOV so they can see more. Ideally (or at least for MP games) the server should set some form of max but I've no idea how the heck you'd get the server to enforce client rendering.


As for the original resource, I've always been of the opinion that some of these settings should be held in a separate configurable file rather than hard-coded into the script functions/datablocks.

Link to comment
Share on other sites

Got an Issue where it makes weapons unselectable in 3.10

 

That is weird, I can't really think what would cause that. The resource is fairly useless anyway, to be honest. It was more of an exercise for me. As he mentioned, Duion has a working slider in Ubergame and his project is open source so that would probably be a better thing to get working. Plus his GUI is very polished and seems to be better then most I've seen.


@Duion If the player model is the paintball player, could it go more then 100?

Link to comment
Share on other sites

My paintball player works up to 120 FOV since he uses true first person, so it always fits, the only issue is maybe you will be clipping into your chest or so when looking down.

The first person arms are just put on your screen, so you will be able to see the ends if your FOV gets too high, but I fixed that with eye offset in the weapon image datablock.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...