Page 1 of 1

Keyboard repeat events

PostPosted: Jun 24, 2003 @ 8:41pm
by fzammetti

PostPosted: Jun 24, 2003 @ 9:06pm
by Dan East

PostPosted: Jun 24, 2003 @ 11:30pm
by ppcStudios

PostPosted: Jun 25, 2003 @ 12:02am
by fzammetti

PostPosted: Jun 25, 2003 @ 4:18pm
by StarFury
Hi,

I know its slightly off topic but why is it always best to use time based animation instead of some form of frame counting?

TIA

PostPosted: Jun 25, 2003 @ 4:25pm
by Guest
I have to admit I don't even know what the term "time-based animation" really means.

I always limit my games to some specific frame rate and base everything off that. I mean, if it's limited to 30FPS for instance (usually my choice) and I can guarantee that the frame rate will always be constant (based on the fact that if it's steady on my E-125 then I assume any modern device will handle it without trouble), then I can make sure everything works properly at that speed and I'm good to go.

Is THAT time-based?

PostPosted: Jun 25, 2003 @ 5:00pm
by Guest
By limiting your fps your are basically limiting your program in a "time based" way. What they are talking about is letting the rendering engine display as many fps as it can handel on the current device while limiting the parts of the functions that update the gamestate(so you dont end up having to press the keys as fast as your framerate).

PostPosted: Jun 25, 2003 @ 5:37pm
by ppcStudios
Time based animation infers that every specified 'tick' increments the animation frame. That 'tick' could be every 20ms, 50ms, 100ms... anything you define it to be. For instance, if you want 10fps animation for a walking animation, then your 'tick' would be 100ms. If you are on a faster processor, your animations will always produce the same motion at the same speed. If you weren't time based and moved to a faster processor, your animations would speed up accordingly. If you are on a slower processor - one that can't keep up with the defined 'tick' time, then you could conceivably skip missed frames to maintain the proper animation speed.

PostPosted: Jun 25, 2003 @ 7:26pm
by Guest

PostPosted: Jun 25, 2003 @ 7:28pm
by StarFury

PostPosted: Jun 26, 2003 @ 12:31am
by egarayblas
Hi fzammetti,

If you're using GapiApplication, you can try commenting out line 443 of GapiApplication.cpp.

if (!(lParam & 0x40000000)){

Whenever a key is pressed, the code in your KeyDown event will be called while it remains pressed. It works for me.

sbl: Is this safe to use? I found this solution on another thread.

PostPosted: Jun 26, 2003 @ 8:57am
by Johan