[SDL] What Im doing wrong (Event procesing)
alejandrosantos at fibertel.com.ar
Thu Dec 11 07:08:03 PST 2003
At what framerate do you keep your game ? Perhaps the problem is there.
Depending how do you get the input, if you read the events at each frame,
then if you are at a slow frame rate you will notice some lag.
For example: (in pseudocode)
Delay //for constant framerate
If the Delay is too high, there will be a slowdown in the input processing.
I have never used Timers in SDL. Can you send how you did it ?
----- Original Message -----
From: <marting at webklan.com>
To: <SDL at libsdl.org>
Sent: Thursday, December 11, 2003 11:18 AM
Subject: [SDL] What Im doing wrong (Event procesing)
Hi everyone. Well I read this list since long time ago but
sent any msg, so here I am.
I am having some problems with the performance picking up input events
from the keyboard and I dont know what Im doing wrong.
I have some kind of lag between the moment when I press a key and the
moment when the event is processed. Im working on Windows, I didn't try it
Sometimes while the game is runing I have a high response time, and when
the event is worked it has a reaction like if I press the key twice very
Is a simple app is a tetris.
When I press the rotation key the most of the time it works fine but
sometimes the tetramino rotate twice just like the event stay stucked . I
know if Im beeing clear.
Could you give me some tips about of how to raise the performace?
Im not using opengl, I use HW surfaces and SW surfaces, and use double
buffering when use software. I have de SDL_Event structure in the main. And
I use the sdl timer to keep the frame rate uniform.
If you want more detail just ask.
SDL mailing list
SDL at libsdl.org
More information about the SDL