when to check for input

Started by
3 comments, last by Tai-Pan 20 years, 10 months ago
when should I call my UpdateInput routines? Im using SDL, and Im checking for input every loop at the main game loop...is this ok or should I check for input after some time delay? Thanks in advance "Those who follow the path of the warrior must be ready to die, to stand for their convictions, live for one´s convictions, die for one´s convictions"
"Those who follow the path of the warrior must be ready to die, to stand for their convictions, live for one´s convictions, die for one´s convictions"
Advertisement
ahh does SDL use callbacks for input? if so, then just use those...

...................................................

SDL uses an event system..for example...each time a key is pressed..a new keyboard event is created..as soon as that event is created.I update my input
"Those who follow the path of the warrior must be ready to die, to stand for their convictions, live for one´s convictions, die for one´s convictions"
Well I call SDL_PollEvents(&event) every frame. I''ve never seen any problem with doing it this way.
what do you mean by frame? Are you calling SDL_PollEvents(&event) after some delay time has passed?(when its time to update frames), or every time in the game loop?
"Those who follow the path of the warrior must be ready to die, to stand for their convictions, live for one´s convictions, die for one´s convictions"

This topic is closed to new replies.

Advertisement