FPS question

Started by
11 comments, last by bujcat 18 years, 8 months ago
I have a game which have some simple animation(movement). Is a ping pong 3D game. The FPS is about at 77. I have only simple objects (10 rectangle, one sphere, one circle). I have created the objects using vertex buffers. Isn't the FPS to low? Complicated games(sophisticated graphics) which I have seen go at maximum 230FPS.
Advertisement
Well, you cannot say so. It depends on a computer you're using and how you write your code.
My computer shows fullscreen graphics maximum on 60 fps (I think that's because of the screen), while windowed mode works ok.
I'm sure there are many reasons for your low FPS. But try first
to turn off vsync when creating the DirectX device. Like this:

D3DPRESENT_PARAMETERS params;
:

// vsync is off
params.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
:

The "params" goes into the "CreateDevice" call:
CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, ....);
www.pokersniffer.org
The modification of this parameter could have other consequences?
Yes, it could cause "slicing" artifacts to appear. This is when your display is half way through refreshing and the picture changes, leaving a your screen with half of one frame and half of another. Don't worry about it though, it's barely noticeable because it's only there for a few milliseconds.
___________________________________________________David OlsenIf I've helped you, please vote for PigeonGrape!
Do you know and some others solutions for improving the FPS?

Quote:Original post by bujcat
Do you know and some others solutions for improving the FPS?


You have to realize the difference between improving the FPS, and improving the time actually spent to render frames... having Vertical-Sync means you will at best have a static FPS locked to the refreshrate of the monitor... HOWEVER, it doesn't mean your application is running slow as you could actually without Vertical-Sync be running at 450 FPS.

And no, there is no other way, either you let the FPS fly on and don't use vertical-sync, or you use vertical-sync and let it be limited to the refreshrate... ideally, there is nothing bad to say about vertical-sync... you spend only the time you need rendering, no tearing... HOWEVER, vertical-sync can in certain scenarios cap your FPS to half if unlucky, or make the game feel less responsive.

And for a pong game, one should perhaps use vertical-sync as it could otherwise really hurt your eyes watching that little ball go flipper.


I have saw a benchmark application wich have runned an demo at about 230 FPS on my computer but without flickering. I understand that they are using specially methods for this.

Thanks for your help.
Try recording your FPS before you present the frame and see what you get.
Projects:> Thacmus - CMS (PHP 5, MySQL)Paused:> dgi> MegaMan X Crossfire
Quote:Original post by bujcat
I have a game which have some simple animation(movement). Is a ping pong 3D game. The FPS is about at 77. I have only simple objects (10 rectangle, one sphere, one circle). I have created the objects using vertex buffers.
Isn't the FPS to low?


The only reasons I can think of for such low framerates with those requirements (other than using the REF device) is either a very slow graphics card or you have the DirectX debug runtimes enabled.

Go to the control panel and select the DirectX icon. In the dialog that opens, select the "Direct3D" tab. In the section "Debug\Retail D3D Runtime" see if the "Use Debug Version of Direct3D" is selected. if it is then select "Use Retail version of Direct3D" and see if your frame rates improve.

Even when developing a DirectX apps, I usually have the retail runtimes enabled unless I need to track down a bug, and in that case I enable the debug runtimes.

HTH,
Cambo_frog


For the love of god, please tell me that you've just omitted your error checking code for brevity, and you don't really assume that all those functions succeed.

This topic is closed to new replies.

Advertisement