Author Topic: Higher Game Framerate Than Graphics Framerate  (Read 5038 times)

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Higher Game Framerate Than Graphics Framerate
« on: February 16, 2011, 09:28:00 PM »
http://dplogin.com/dplogin/featurevote/feature.php?id=10251

This would effectively "fake" higher FPS rates.  Instead of waiting for the graphics to finish rendering, the rest of the game logic (inputs, network, sound, etc.) would run continuously, and rendering calls would only be made when a frame finished rendering.  If you had a crappy graphics card that only rendered at 10fps, you could still potentially run the game at 100fps, but only 1 in every 10 frames would be rendered.

I think I have a clever way to implement this by simply putting the qglSwapBuffers in a separate thread and not making any OpenGL calls until it finishes.  Of course, it will probably end up being more complex than that.

T3RR0R15T

  • Map Committee
  • Autococker
  • Posts: 2593
Re: Higher Game Framerate Than Graphics Framerate
« Reply #1 on: February 25, 2011, 01:03:16 PM »
Wouldn't that need more cpu power and looks ingame, like the other players are lagging?

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Higher Game Framerate Than Graphics Framerate
« Reply #2 on: March 08, 2011, 11:57:10 AM »
Actually, it would smooth out the movements of laggy players (if they were laggy due to low framerate).  The game would be more responsive, and network updates would be more frequent, you would just be limited to seeing them by your video card framerate.  It would be like you're playing at 100fps, but you only see every Xth frame.

payl

  • 68 Carbine
  • Posts: 365
Re: Higher Game Framerate Than Graphics Framerate
« Reply #3 on: March 09, 2011, 09:20:26 AM »
That make paintball more optimised for 2cpu processors.. +1. I'm surprised, because i think that was already done... What paintball uses 14 threads for? -.-'

T3RR0R15T

  • Map Committee
  • Autococker
  • Posts: 2593
Re: Higher Game Framerate Than Graphics Framerate
« Reply #4 on: March 09, 2011, 09:49:58 AM »
Ok, why not.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Higher Game Framerate Than Graphics Framerate
« Reply #5 on: March 09, 2011, 11:10:50 AM »
That make paintball more optimised for 2cpu processors.. +1. I'm surprised, because i think that was already done... What paintball uses 14 threads for? -.-'
14? o.O.  I think the only thing I use multithreading for is the server browser, so it can run through and ping servers without freezing up the UI.  Maybe some login stuff, too.

payl

  • 68 Carbine
  • Posts: 365
Re: Higher Game Framerate Than Graphics Framerate
« Reply #6 on: March 09, 2011, 11:47:47 AM »
14? o.O.  I think the only thing I use multithreading for is the server browser, so it can run through and ping servers without freezing up the UI.  Maybe some login stuff, too.
Yes, 14, watch attachment ('WÄ…tki' mean threads. I love Polish too).
With my testapp which had 3 threads it says 4 threads... So Windows7 lies. But i guess that in menu paintball have something like 8 threads? OpenGL? Sound? Everything could create thread... But one thread uses most CPU time (like 50% ingame on 2x2,5Ghz).

rafalluz

  • VM-68
  • Posts: 131
Re: Higher Game Framerate Than Graphics Framerate
« Reply #7 on: March 09, 2011, 01:27:26 PM »
Quote
With my testapp which had 3 threads it says 4 threads...

Maybe your app spawned 3 threads? If it did, then it would have 4, because even if you spawn none, you still have 1 thread.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Higher Game Framerate Than Graphics Framerate
« Reply #8 on: March 09, 2011, 02:35:17 PM »
Well, the number of threads doesn't really matter.  There's probably some libraries creating threads under the hood or something.  Paintball2 is almost entirely single threaded.  Waiting for the render to finish in its own thread would allow the game to run at a much faster "framerate" and stop choppy sound and movement (I think).

payl

  • 68 Carbine
  • Posts: 365
Re: Higher Game Framerate Than Graphics Framerate
« Reply #9 on: March 09, 2011, 02:53:32 PM »
Maybe your app spawned 3 threads? If it did, then it would have 4, because even if you spawn none, you still have 1 thread.
1.Mainthread
2.SendThread
3.RecieveThread
so 3... first one is main (that i didn't spawned).
Waiting for the render to finish in its own thread would allow the game to run at a much faster "framerate" and stop choppy sound and movement (I think).
...And make it more optimised for dual cpu, so yes, thats good idea. But when talking about laggy computers, then i guess that graphics card isn't mostly used component. CPU is, so creating two threads on one core could lag more than one thread. But there is no sense to speak about that (because no one really knows what will happen), you need to check this.

T3RR0R15T

  • Map Committee
  • Autococker
  • Posts: 2593
Re: Higher Game Framerate Than Graphics Framerate
« Reply #10 on: March 09, 2011, 03:38:32 PM »
And make it more optimised for dual cpu...

+ quad core cpu :P

Rick

  • Map Committee
  • Autococker
  • Posts: 2190
Re: Higher Game Framerate Than Graphics Framerate
« Reply #11 on: March 09, 2011, 05:14:20 PM »
Do it. ;)

webhead

  • Committee Member
  • Autococker
  • Posts: 1185
Re: Higher Game Framerate Than Graphics Framerate
« Reply #12 on: March 20, 2011, 12:46:21 PM »
Would you call this a feature or a tweak? I notice jits marked it as a feature but it sounds more like a tweak to me.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Higher Game Framerate Than Graphics Framerate
« Reply #13 on: March 21, 2011, 01:08:14 PM »
It requires new functionality, so I'd call it a feature.  Multithreading isn't trivial.