What should I be getting with FPS?

Ok I have setup a basic SDL app, with HW, DB and full screen.

I have been doing some tests and they are very disapointing…
at 640x 480 @ 32bit in full screen mode
If I dont draw anything at all to the screen I get 170 fps

now if I draw a pic that is about 1/3 the size of the screen it drops down
to 120
if I draw that pic once every 2 passes I get about 145ish

if I draw 2 pics worth about 1/2 of the screen every pass I get 100fps… At
this rate I will get .5 fps with a full screen being drawn

I know its not optimized at all but, again I drawn 1 pic that is 103pix tall
and 480pix wide and my frames dropped 50.

I tested an opengl app that displayed 1 quad and I got about 1600fps, yes
1000+600+00+0.
Should this app be getting at least 500fps, by drawning nothing on the
screen?

What gets me is, q3 ut 2003 etc can get 150+ fps with all that stuff going
on and I can match them without anything being drawn at all :frowning:
Should I just start with opengl and hope my fps will grow ?

cheers

what OS?

a couple things to consider:

Its possible for games to turn of VSync which if you dont know what that
is…it makes it so it only updates the screen inbetween monitor refreshes.
This lowers your FPS since whenever it needs to update, it sits and waits
for the next “right moment”.

Another thing to consider is that GL has hardware while regular 2d apps
dont. GL has the kind of hardware acceleration (i beleive!) that you can
tell the card the coordinates and the color of the quad you want, and the
card handles the rest…which means the CPU does very little work and it
wouldnt lower FPS that much since you are basicly running multiple
processors.

im sure i wasnt 100% technicaly accurate but id give me an 85% :P> ----- Original Message -----

From: davidhaggard@earthlink.net (David)
To:
Sent: Friday, April 11, 2003 11:42 PM
Subject: [SDL] What should I be getting with FPS?

Ok I have setup a basic SDL app, with HW, DB and full screen.

I have been doing some tests and they are very disapointing…
at 640x 480 @ 32bit in full screen mode
If I dont draw anything at all to the screen I get 170 fps

now if I draw a pic that is about 1/3 the size of the screen it drops down
to 120
if I draw that pic once every 2 passes I get about 145ish

if I draw 2 pics worth about 1/2 of the screen every pass I get 100fps…
At
this rate I will get .5 fps with a full screen being drawn

I know its not optimized at all but, again I drawn 1 pic that is 103pix
tall
and 480pix wide and my frames dropped 50.

I tested an opengl app that displayed 1 quad and I got about 1600fps, yes
1000+600+00+0.
Should this app be getting at least 500fps, by drawning nothing on the
screen?

What gets me is, q3 ut 2003 etc can get 150+ fps with all that stuff going
on and I can match them without anything being drawn at all :frowning:
Should I just start with opengl and hope my fps will grow ?

cheers


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

[…]

What gets me is, q3 ut 2003 etc can get 150+ fps with all that
stuff going on and I can match them without anything being drawn at
all :frowning: Should I just start with opengl and hope my fps will grow ?

The difference is hardware acceleration. The problem isn’t really the
video cards, but the APIs and driver architectures. 2D rendering is a
huge mess; many APIs (on average two or three per platform, from what
I’ve seen), poor drivers, and architectures that are not suitable for
the kind of stuff SDL is meant for. You can’t even count on plain
rectangular blits being accelerated, even if you do everything right.

These days, 3D is what it’s all about. 3D games make people buy video
cards. Software rendering is ignored by h/w designerns, so touching
VRAM with the CPU only gives you a tiny fraction of the maximum PCI
or AGP bandwidth. The quality of a driver is measured in terms of
OpenGL and/or Direct3D performance. All significant API
standardization efforts are aimed at 3D rendering. OpenGL is
available for pretty much anything with graphics, while there is
nothing like it for 2D rendering, that would work well with
accelerated drivers.

So, yes, if you need that kind of performance, you need h/w
acceleration, and then your best bet is to use one of the de-facto
standard 3D APIs; OpenGL or Direct3D.

If you’re interested in other platforms than Windows, the obvious
choice is OpenGL, since Direct3D is not available on anything but
Windows. If you’re going to sell something for Windows and want to
maximize sales, you should probably support both, for three reasons;

1) Microsoft want everyone to use Direct3D, so some
   versions of Windows come with accelerated drivers
   for Direct3D only. Users are on their own if they
   need accelerated OpenGL, which may be an issue for
   less hardcore gamers.

2) Some video cards don't have OpenGL drivers at all.

3) In some cases, the Direct3D drivers are faster
   and/or more solid than the OpenGL drivers.

If you don’t want to code directly towards both OpenGL and Direct3D,
you might get away with an OpenGL-over-Direct3D layer of some kinds.
There are both free and commercial solutions, although it seems that
it’s more common for commercial games to implement higher level
layers for maximum performance with both APIs.

If you don’t want to code to a 3D API at all, and want relatively fast
(ie much faster than s/w OpenGL) 2D rendering as an extra bonus, you
might try glSDL, which implements the SDL 2D API on top of OpenGL:

http://olofson.net/mixed.html

It’s a compile time wrapper rather than a real backend, and there’s no
Direct3D support, but it might be handy if you want your 2D game to
run at all without 3D acceleration without coding for two APIs.

//David Olofson - Programmer, Composer, Open Source Advocate

.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se —On Saturday 12 April 2003 08.42, David wrote: