[SDL] Scrolling background

x5101920 at fedro.ugr.es x5101920 at fedro.ugr.es
Tue Jun 12 04:54:30 PDT 2001


Mensaje citado por: Jan Kratochvil <honza at twin.jikos.cz>:

> Hi,
>  i tried to make scrolling background using SDL and i have to make some
> terible mistake because it is teribly slow.
> I am using resolution 800x600 (32b colors).
> is there any better(faster) solution than using
> 
> SDL_BlitSurface(image, &src, screen, &dest);
> SDL_UpdateRect(screen,0,0,0,0);
> 
> where src y coordinate is incrementing. If i call this two functions in
> for cycle i get speed from 6 up to 10 frames per second.
> Please help.
> Thanx Jan Kratochvil

:)
Welcome to the club.
I can't get more that 30 fps on SDL on 640x480x16 bits by just blitting a 
surface to screen and updating.
The only way to get a real fast thing ( 1000 fps ) is to use 
SDL_HWSURFACE|SDL_FULLSCREEN but it crash on exit. :(

I am looking for the bug, and I will try to report...


                  Miguel Angel Blanch Lardin
 
             -- http://www.arianne.cx -- Arianne --
The free open source massively multiplayer online role playing game

nuclear cia fbi spy password code encrypt president bomb iran irak korea cuba
Ala yihad mosad kgb free freedom human rights yugoslavia kosovo ebola dna 
 
                    -- Echelon must die --



More information about the SDL mailing list