Results 1 to 9 of 9

Thread: FPS Locked at 60? And poor performance

  1. #1

    FPS Locked at 60? And poor performance

    Couple of quick questions, I hope someone can shed some light on these.

    I am getting 60 fps using the DirectX 7 DirectDraw interface, yet the game is not coded in any way to VBlank, so why is it limited at 60? It's matching my montor refresh but I don't want this, what can I do? I have searched everywhere for info but cannot find anything other than 'WaitForVBlank' but I want to do the opposite.

    The other problem has been mentioned here before, but I am not sure if it is clear cut. I get drops in FPS to around 30 - 40, yet the game and my system should not allow this... Someone using an ATI card gets 500 fps constant, meanwhile my GeForce 4400 gives 60 (tied to refresh rate grrr) and drops to 20, 30, 40 when there are several small sprites on screen.

    If I load everything into VRAM it makes NO difference at all, suggesting that it's the code, but it's not... I tested DelphiX using the same display size etc and it was really fast and funnily enough had no VBlank issue?

    Is there a specific problem with NVidia cards, can I disable the VBlank as well? Been tearing my hair out for months over this =(
    http://www.c5software.co.uk (site is being developed at the moment)

  2. #2

    FPS Locked at 60? And poor performance

    It's strange that using video memory makes no difference, do you fall back to system memory when creating surfaces and video memory fails? If that's the case try putting in some error messages to see if video memory fails. Perhaps VSync is turned on in display & performance settings under display properties?

  3. #3

    FPS Locked at 60? And poor performance

    When calling the flip function, try passing the flag DDFLIP_NOVSYNC (or maybe DDFLIP_DONOTWAIT, I forget). The down side here is that going faster than the v-synch can cause artifacts on the screen ("tearing"), but if you're fine with that then go for it.
    "All paid jobs absorb and degrade the mind."
    <br />-- Aristotle

  4. #4

    FPS Locked at 60? And poor performance

    Quote Originally Posted by Alimonster
    When calling the flip function, try passing the flag DDFLIP_NOVSYNC (or maybe DDFLIP_DONOTWAIT, I forget). The down side here is that going faster than the v-synch can cause artifacts on the screen ("tearing"), but if you're fine with that then go for it.
    Hi, I made that change today after reading about DDFLIP_DONOTWAIT on the gamedev site. It works and gives constant 72fps (tied to VBlank). With VBlank off I get 200+ fps lol

    I tested the Flip result and it works perfectly everytime, with no error returned, which leads me to the next question...

    Why use DDWAIT?? It seems to wait no matter what? I thought it was supposed to wait for the hardware? I think nVidia DDraw drivers are bugged.
    http://www.c5software.co.uk (site is being developed at the moment)

  5. #5

    FPS Locked at 60? And poor performance

    It should have an effect if VBlank is not overridden by the drivers, try setting VBlank to Application-controlled

  6. #6

    FPS Locked at 60? And poor performance

    Quote Originally Posted by Paulius
    It should have an effect if VBlank is not overridden by the drivers, try setting VBlank to Application-controlled
    What I mean is, that if I have DDFLIP_DONOTWAIT it runs at the 72fps refresh rate of monitor. if DDFLIP_WAIT is set, it runs at 60 - 62fps, even if display is at 72hz.

    If I disable VBlank, as well as use DDFLIP_DONOTWAIT I get 120 - 200fps! With no errors from blitting or flipping, with no real artifacts, just the standard 'jerky' refresh tear. Obviously I don't want to disable VBlank, unless there is some miracle way of manually timing it, and what would the advantage be?

    I am puzzled what it is that it waits for if you use DDFLIP_WAIT, as it obviously doesn't need to wait for anything, or at lease I cant see it...
    http://www.c5software.co.uk (site is being developed at the moment)

  7. #7

    FPS Locked at 60? And poor performance

    You get 60-62fps with DDFLIP_WAIT because your update and draw is taking long enough sometimes to just miss a vertical blank, so it has to wait for an entire frame to do the flip. This results in a dropped frame and a lower fps reading.

  8. #8

    FPS Locked at 60? And poor performance

    Quote Originally Posted by Sly
    You get 60-62fps with DDFLIP_WAIT because your update and draw is taking long enough sometimes to just miss a vertical blank, so it has to wait for an entire frame to do the flip. This results in a dropped frame and a lower fps reading.
    Hmmm, so how does using DDFLIP_DONOTWAIT affect VBlank, and is there an reason not to use it? It doesn't seem to tear the image or anything so it must still be waiting for VBlank?

    Are we saying that DDFLIP_DONOWAIT is just flipping when the drawing hasn't finished? If so, shouldn't I see some artifacts?
    http://www.c5software.co.uk (site is being developed at the moment)

  9. #9

    FPS Locked at 60? And poor performance

    It's been a while since I've used DirectDraw, so my recollection of the details of DDFLIP_DONOTWAIT and DDFLIP_WAIT are a bit fuzzy. I have to say that I am now at a loss as to explain why this is happening.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •