Why is this unforgivably slow?

Started by
15 comments, last by Icon 14 years, 9 months ago
@Antheus: You're right, I am exaggerating the speed issues. Still, this *could* be going faster.

@Erik Rufelt: I upgraded to the newest drivers and to SDL 1.2.13 (I had 1.2.9), but there's no change.
Advertisement
What OS/Hardware do you have?
Have you checked so that your screen is set to 32-bit color?
As Antheus said a bit-depth conversion can be very slow.

It most definitely shouldn't be that slow. Transferring to the graphics card is slower than writing to standard RAM, but usually not that much slower. What AGP speed is your graphics card?
Check the control panel so that AGP is set to 8x or what your card supports. On a previous card I had it was automatically set to 1x, which made things very slow. I solved it by downloading AGP controller drivers for the motherboard or something like that, graphics card drivers weren't enough. You might be experiencing a similar problem.
Quote:Original post by Erik Rufelt
What OS/Hardware do you have?
Have you checked so that your screen is set to 32-bit color?
As Antheus said a bit-depth conversion can be very slow.


Windows XP Sp 1. My hardware is in my third post here. Yup, my screen is at 32-bit depth.

Quote:What AGP speed is your graphics card?
Check the control panel so that AGP is set to 8x or what your card supports. On a previous card I had it was automatically set to 1x, which made things very slow. I solved it by downloading AGP controller drivers for the motherboard or something like that, graphics card drivers weren't enough. You might be experiencing a similar problem.


It's AGP 8x, but I don't know if it's set to something lower than that. I find that highly unlikely, though; it runs modern games as well as I'd expect from it's specs.
It might not influence most games, since they probably put all their data on the graphics card when loading a map, so only the load time would suffer. It only affects transferring memory to the card.
Since your code works fine for me on the same compiler there must be some strange bug somewhere.. when you updated SDL did you also update the DLL in the system32 folder, or in the project folder if you keep it there?
Not sure if it should work if you didn't though.. =)
You mentioned old projects using SDL that get reasonable speeds. Try taking one of those and reducing it down to the example you have here, testing its speed after each change to see which one breaks it.
Jetblade: an open-source 2D platforming game in the style of Metroid and Castlevania, with procedurally-generated levels
A few years ago I tried to make a breakout clone, but I faced this very issue: I wanted it to run at 1024x768, but I had to reduce it to 640x480. IIRC, using lower bit depth speeded it up, but I thought it would have been stupid to go to 8 bit or 16 bit graphic in 2005/2006 :-)

Btw: it was an AGP GF 6600, and I'm quite sure it was a bandwith issue. I was not motivated enough at the time to go further :-(
Have you tried to set the enviroment variable SDL_VIDEODRIVER=directx ? More on this here

This topic is closed to new replies.

Advertisement