Speed problems

why my app goes faster when i set the video mode with this flags : SDL_FULLSCREEN.
than with that : SDL_DOUBLEBUF | SDL_HWSURFACE | SDL_FULLSCREEN.

thanks a lot.

You should give some details of the conf you are using, the display method and the game logic . By looking at the flags you are using I suppose that you are under windows. If so, when you disable the SDL_DOUBLEBUK i think SDL flip the screen without sync, so if you have quick computer you display as many frames as possible, maybe more than 100/sec. In this case, if you move your objects at each frame then they will move really fast. Usually you should move objects on a time based method (gives a machine independent behavior to the game) and not on a frame based one (the method I suppose you use). Unfortunately all these consideration relies on suppositions…

Julien----- Original Message -----
From: David Roguin
To: sdl at libsdl.org
Sent: Monday, July 28, 2003 4:41 PM
Subject: [SDL] speed problems

why my app goes faster when i set the video mode with this flags : SDL_FULLSCREEN.
than with that : SDL_DOUBLEBUF | SDL_HWSURFACE | SDL_FULLSCREEN.

thanks a lot.

why my app goes faster when i set the video mode with this flags :
SDL_FULLSCREEN.
than with that : SDL_DOUBLEBUF | SDL_HWSURFACE | SDL_FULLSCREEN.

thanks a lot.

Because hardware surfaces are very slow when you access them with
software.

	Bob PendletonOn Mon, 2003-07-28 at 09:41, David Roguin wrote:


±----------------------------------+