Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Framerate independent keyboard sampling

Meekrat Pendragon
Registered User
Join date: 30 Dec 2003
Posts: 19
01-07-2004 19:08
I was talking to Ian Linden about some movement problems I've been having, and he said the keyboard is only sampled once per frame. I know that is the norm for a game, but I believe it causes problems in SL: framerate goes down as more avatars join a group, which implies movement control gets worse. It can turn you into a real jerk bumping everyone as you try and pick an open spot in the group circle.

I'd like to see the keyboard either sampled more regularly, or listened in an event push fashion, so that movement can be calculated in terms of the (milli-)seconds the key is held, rather than just a yes/no boolean per frame. I really believe the overhead of more kb samples, and maybe a tiny bit of thread synchronization are worth it in this case.



Meek
Huns Valen
Don't PM me here.
Join date: 3 May 2003
Posts: 2,749
01-10-2004 02:21
Thumbs up.
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
01-10-2004 10:28
Thumbs, toes, and other various appendages up.
Baba Yamamoto
baba@slinked.net
Join date: 26 May 2003
Posts: 1,024
01-12-2004 08:03
You were at the Darko Bday party? Lets stick to hands and feet now. OK?


Yea! I want this feature.
Tiger Crossing
The Prim Maker
Join date: 18 Aug 2003
Posts: 1,560
01-12-2004 11:02
I'm all for this!

BUT... It may not be technically possible. The client has to send the keystokes to the server, and that is only done once per frame. (I think.) So sampling more often doesn't help TOO much.

BUT AGAIN... If the inputs were monitored on a separate thread, then no keystrokes would be MISSED, and that's the biggest problem in most control issues. This is something I VERY much want.
_____________________
~ Tiger Crossing
~ (Nonsanity)
Meekrat Pendragon
Registered User
Join date: 30 Dec 2003
Posts: 19
01-12-2004 11:48
From: someone
Originally posted by Tiger Crossing
It may not be technically possible. The client has to send the keystokes to the server, and that is only done once per frame. (I think.) So sampling more often doesn't help TOO much.



Instead of just sending a boolean per key per frame, the system should send a time measure of how long the key was held. Thus is key tap remains a key tap, rather than making the assumption the key was held for full quarter second on a low framerate machine.

Suppose there are other assumptions that could be made, such as "assume the minimal duration until the second frame teh key is held down". This might work for keytaps without getting over complicated. In anycase, the keyboard input need work.


Meek