SDL Speed

Hello

I’ve recently decided to have a look at SDL and I’m quite impressed.

Is there a list of performce for different app types at all? Say there’s a simple blitting app and all it does is blit 50 100x100 sprites to the screen and what fps it gets on different specced machines?

I’m quite interested in using it to develop games for quite low specced machines, around about p2-300. If possible I’d like some nice alpha effects but I’m a bit concerned to put loads of effort in to find it goes too slow. Would I be better off using opengl and writing a 2d library so I can alphablend in hardware? and not worry too much if the user doesn’t support the acceleration.

Is there a list of "tips n tricks’ anywhere? From previous experience I know if you want to do any alphas you need to do them in software so you’re better off having all of your surfaces in software. Basically, I’d like to try and do things ‘correct’ from the start.

Any other bits of advice and what to look out for?

Thanks

Scott

“Scott Newby” writes:

Any other bits of advice and what to look out for?

You can always use glSDL which is GL wearing the clothes of SDL.
http://olofson.net/mixed.html

From the short info on that page:

``glSDL is an implementation of the SDL API on top of OpenGL. This
version is a proof-of-concept hack, and is implemented as a
"wrapper" around SDL. However, the final version will be a real
rendering backend, which will make it possible for most SDL
applications to use hardware acceleration for all blits to the
screen.’’

Basically what it means, as far as I understand it, is that you write
your app as normal SDL, but can optionally link with glSDL (it’s a
link time change, not runtime) to take advantage of 3D acceleration.

Note: I have not tried it myself.–
[ Below is a random fortune, which is unrelated to the above message. ]
Hollerith, v.:
What thou doest when thy phone is on the fritzeth.

Scott Newby wrote:

Is there a list of performce for different app types at all? Say
there’s a simple blitting app and all it does is blit 50 100x100 sprites
to the screen and what fps it gets on different specced machines?

There is one test actually that does something like this. (testsprite or
something like that). It managed about 280 fps on my P3.

I’m quite interested in using it to develop games for quite low specced
machines, around about p2-300. If possible I’d like some nice alpha
effects but I’m a bit concerned to put loads of effort in to find it
goes too slow. Would I be better off using opengl and writing a 2d
library so I can alphablend in hardware? and not worry too much if the
user doesn’t support the acceleration.

I’m not sure. I just converted of one of my games from DirectX to SDL
and it works at the same speed.

Is there a list of "tips n tricks’ anywhere? >From previous experience
I know if you want to do any alphas you need to do them in software so
you’re better off having all of your surfaces in software. Basically,
I’d like to try and do things ‘correct’ from the start.

There is one tip that I wish I knew at start: when you load an image,
always convert it to the screen format…works a lot faster when you
blit it later.

Any other bits of advice and what to look out for?

Take a look at sources of some examples that come with the library, you
can learn a lot so: “Use the source, Luke.” :wink:

HTH–
Milan Babuskov
http://fbexport.sourceforge.net