AlchemyViewer / Alchemy

Alchemy is a Second Life compatible viewer striving to be at the forefront of stability, performance, and technological advancement in the open-source metaverse viewer field.
https://www.alchemyviewer.org
GNU Lesser General Public License v2.1
14 stars 10 forks source link

[Bug]: Directional Input Delays with latest PBR-Capable Viewers #51

Open Alistar33 opened 5 days ago

Alistar33 commented 5 days ago

Environment

Alchemy Beta 7.1.9.2492

Description

Direcitonal inputs are noticably delayed and/or inconsistent in PBR viewers compared to non-PBR viewers, said delays being most noticeable when operating vehicles. Delays in inputs can result in key-presses that are longer than intended, or in some cases may result in no input being registered at all (the latter most notable again while operating a vehicle).

it sounds like it's a cross-Platform issue, and not Windows-only and it affects every viewer (SLV, Firestorm 7.x, Alchemy) except Cool VL viewer (PBR enabled) that keeps around 440-450 (v1.32.1.9 version, Linux OS) and 430 (last version 22th June - v1.32.2.1 - Win 11 OS).

See https://feedback.secondlife.com/bug-reports/p/directional-input-delays-with-latest-pbr-capable-viewers for more details

Reproduction steps

Repro :

Go to an empty region and let everything load - I used an empty sandbox.

Put the following script in a prim, then add/wear it on your avatar.

Press and hold the Left arrow key down for 10 seconds.

At the end of 10 seconds, the script will report how many control events triggered in those 10 secs.

You can then let go the arrow key, and repeat the test to verify the results.

Log out and try the same in a different viewer.

My results :

non-PBR viewer (Firestorm 6.6.14) : 450 control events per 10 sec PBR viewer (official LL viewer) : 271 control events per 10 sec

integer count;
default
{
control(key id, integer levels, integer edges)
{
integer start = levels & edges;
integer end = ~levels & edges;
if (start & CONTROL_ROT_LEFT)
{
count = 0;
llSetTimerEvent(10.0);
llOwnerSay("Timer started.\nHold key on for 10 seconds.");
}
if (end & CONTROL_ROT_LEFT)
{
llSetTimerEvent(0.0);
}
count += 1;
}
timer()
{
llSetTimerEvent(0.0);
llOwnerSay("Timer stopped.\nControl events count per 10sec : "+(string)count);
}
attach(key ID)
{
if (ID != NULL_KEY)
{
llSetTimerEvent(0.0);
count = 0;
llRequestPermissions(ID, PERMISSION_TAKE_CONTROLS);
}
}
run_time_permissions(integer perm)
{
if (perm & PERMISSION_TAKE_CONTROLS)
{
 llTakeControls(CONTROL_ROT_LEFT, TRUE, FALSE);
}
}
}