Author Topic: Is the FPS limit removable?  (Read 9846 times)

0 Members and 1 Guest are viewing this topic.

Offline Lightspeed

  • Light Years Ahead
  • 212
Is the FPS limit removable?
its a really good book, btw. ;)
Modern man is the missing link between ape and human being.

 

Offline J3Vr6

  • 28
Is the FPS limit removable?
:nod:

Anyway, I don't think many people hit that 120 fps limit so I don't know what the big deal is on pushing it.  What do you see/feel/rub better at 250 fps than at 120?  This is coming from a guy who's never had a game be at 60 or above.
"I wanna drink til I'm drunk, and smoke til I'm senseless..."
-Tricky

"Hey barkeep, who's leg do I have to hump to get a dry martini around here?"
-Brian, Family Guy

 

Offline marajin

  • 26
    • http://marajin.w-ww.org
Is the FPS limit removable?
Jocks compare what they stash in their pants... Geeks compare their FPS counts..  I think Taylor mentioned this earlier ;)

Personally I do smack head first into that 120FPS limit, but I don't mind. I'm generally happy at anything above 30

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Is the FPS limit removable?
I had a sinister idea last night, although today it seems a bit more practical:  having the FPS counter in the HUD be independent of the cap.  The counter would tell you what you would get if the cap weren't there but since the cap is there you don't get the problems involved with removing it.  It would only take a couple lines of code to get working so if people would like that and nobody else minds then it can be easily implemented.

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Is the FPS limit removable?
how bout no
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Is the FPS limit removable?
Quote
Originally posted by Kazan
how bout no

Not sinister enough then. O well. :D

 
Is the FPS limit removable?
Kazan: Why?
just another newbie without any modding, FREDding or real programming experience

you haven't learned masochism until you've tried to read a Microsoft help file.  -- Goober5000
I've got 2 drug-addict syblings and one alcoholic whore. And I'm a ****ing sociopath --an0n
You cannot defeat Windows through strength alone. Only patience, a lot of good luck, and a sledgehammer will do the job. --StratComm

 

Offline J3Vr6

  • 28
Is the FPS limit removable?
What's the point of having it?  It wouldn't be an accurate representation of FPS...
"I wanna drink til I'm drunk, and smoke til I'm senseless..."
-Tricky

"Hey barkeep, who's leg do I have to hump to get a dry martini around here?"
-Brian, Family Guy

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Is the FPS limit removable?
exactly
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Is the FPS limit removable?
well if it figured what fraction of the frame time was being used, then multiplyed the frame time be the reciprical, I think that would be fairly acurate.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Is the FPS limit removable?
it isn't an accurate representation of the FPS - IE the FPS number isn't the number being rendered

cheating with projections is just stupid -
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline J3Vr6

  • 28
Is the FPS limit removable?
That's like driving your car at 30 mph but the speedometer shows 90 cuz that's what it would be at if there wasn't a speed limit.
"I wanna drink til I'm drunk, and smoke til I'm senseless..."
-Tricky

"Hey barkeep, who's leg do I have to hump to get a dry martini around here?"
-Brian, Family Guy

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Is the FPS limit removable?
Quote
Originally posted by J3Vr6
That's like driving your car at 30 mph but the speedometer shows 90 cuz that's what it would be at if there wasn't a speed limit.

Which is why I called it "sinister", it is cheating.  The cap is not going to be able to be fully removed though.  Various parts could probably be made independent of the cap but it still has to be there or the game can get out of control. In about 3 years when hardware (and game optimization) will probably be able to push 200 fps pretty easily then people are going to complain at no end that the fps counter is capped at 120.

I don't really care either way that it's there or not since the 120 fps cap doesn't bother me any and I think it's plenty fast at that speed.  Adjusting various physics stuff to better handle the fps differences might be good but I have yet to see a well coded game that didn't have some sort of fps cap in it.

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Is the FPS limit removable?
there is absolutely no reasons why parts of it are framerate-dependant algorithmically - we can change how they're fed data to fix the problem
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Is the FPS limit removable?
Quote
Originally posted by Kazan
there is absolutely no reasons why parts of it are framerate-dependant algorithmically - we can change how they're fed data to fix the problem

Which is what I'm hoping you'll be able to do.  I couldn't figure out how to make it work correctly when I tried.  It gets the frametime every frame and Sleep()'s away any time over the cap to keep it processing at that speed.  Mission time is set to the frametime so if the cap is gone then the mission time goes as fast as it can.  Accuracy and damage is influenced by frametime so capping that at a lower level would probably make accuracy a bit more predictable (wild a$$ guess).

Uhh, drudging this up again is making my head hurt.  I'm too stupid to get around this one.  I probably should have paid more attention in math class all those years ago.  I can see her now "'told ya!!". :rolleyes:

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Is the FPS limit removable?
the proper way of doing time handling - which is framerate independant requires a static last time variable

static unsigned int lasttime;

and a 'diff' variable

unsigned int timestep;

at the begining of each processing

timestep = time(0) - lasttime;
lasttime=time(0);


which obviously leads to a very small theoreticl error in time processing, but it's so insignificant that the precision loss due to the time storage format is greater
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Is the FPS limit removable?
Doesn't it do that already (please read the last paragraph before saying it's framerate dependent)?
Code: [Select]
cap = F1_0/Framerate_cap;
   if (Frametime < cap) {
      thistime = cap - Frametime;
      Sleep( DWORD(f2fl(thistime) * 1000.0f) );
      Frametime = cap;
      thistime = timer_get_fixed_seconds();
}
...
Last_time = thistime;
flFrametime = f2fl(Frametime);

This is in game_set_frametime().  flFrametime is what's passed around the game.  There is a little more to it than that obviously but that's the gist of it.  The Sleep() command is the only thing that's different from what you've got and it's what keeps the game processing within the cap, otherwise the cap doesn't mean much.  The game would process frames as quickly as it possibly could and the capped frametime would only take affect when it's used to determine weapon damage, accuracy and a few other variables.  anis would play incorrectly, sound sync would be off, etc.

This is framerate dependent obviously but with a minor change or two could also produce an additional framerate independent variable.  I guess the problem I can't seem to get around is that if game processing is kept under the cap (with Sleep()) then would an independent frametime actually have the desired effect?

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Is the FPS limit removable?
updating frames without physics updates is pointless

there shouldn't be problems with sound and animation sync unless they did something massively stupid - but it should still be fixable
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir