Hi,
I’m trying to knock up a very simple game for my own amusement and have run into difficulties.
Initially I drew a simple ball on the screen and movred it left and right by holding down the relevant mouse button. This produced a frame-rate of apx. 70 fps : so far so good !
Next I drew another simple sprite and implemented no movement for that. The ball movement became very sluggish - the fram rate had dropped to apx 37 fps.
I wasn’t sure what was going on here so I guessed. Both images were BMPs with a colour-depth of 16 out of 16 million colours. Thinking this could be slowing things down but not really believing it (:])I dropped the pixel depth to 8/256 colours and tried again. Frame rate was still 37fps but this time the Colour Key was no longer transparent
What probably is transparent is that I’m a total novice at this and really do not know where to look next. If anyone can give me some pointers as to what may be causing these problems I’d be obliged.
I set the video mode to 1024 x 768 x 8 and the videoflags to :
SDL_HWSURFACE | SDL_FULLSCREEN | SDL_ANYFORMAT | SDL_DOUBLEBUF | SDL_HWPALETTE
No conversion is performed on the images because they are both at 8bpp and nothing much
else happens other than reading the mouse, applying the new velocities wiping the screen
and reblitting the sprites with SDL_BlitSurface then flipping the screens.
I have used the testsprite.c example as a refernce
and cannot spot anything fundamentally different between the two other than the icon.bmp in the image has a colour-depth of 4bpp. When I plugged this image into my app. the frame rate remained at 37 fps. My card is an admittedly old Creative Voodoo Banshee but I would’nt expect this sort of and the demos all seem to perform fine.
I have a hunch that it is my lack of knowledge on what is actually happening with the hardware that’s causing the problems but I have no hunch at all as to where to start looking first.
Any suggestions gratefully received!
Thanks , Kev.–
Kev Grindley
<@Kev_Grindley>