Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2025-04-25 00:20:26



Reply to topic  [ 3 posts ] 
More correct send_agent_update() 
Author Message

Joined: 2025-02-22 07:23:16
Posts: 1
Location: San Francisco
Reply with quote
Here is a patch that ports the most recent version of send_agent_update() from LL's Viewer.

A brief history of what happened around this code as I understand it:

Someone at LL noticed that the Viewer was enthusiastically over-sending AgentUpdate messages to the Server and decided to do something about it by adding a throttle. The throttle logic was flawed and caused some messages to be delayed when they should have been sent ASAP. AFAICT the throttle was never adopted by Cool VL, but eventually it did get into FireStorm and vehicle enthusiasts suddenly noticed their fast twitchy race cars became hard to steer. A fix was made to the LL's develop branch, however that branch was rapidly picking up so many changes that merging the whole thing into the delicate-but-all-consuming "faster FPS" effort was considered too risky. By popular demand this particular fix was one of the few things salvaged from develop and ported to whatever was the true active project branch, and was fast tracked into FireStorm.

It seemed to me Cool VL might also be interested in the latest most correct version of send_agent_update(), and which is IMO a prerequisite for a game_control (1*) patch. I did test this to make sure I could still move my avatar around however I didn't test any twitchy vehicles -- I'm not well calibrated to be able to tell whether it is really working at that level anyway. I don't expect anyone to be able to notice a behavior difference after this patch because I believe Cool VL is currently using the "enthusiastic over-send" logic which basically sends AgentUpdate message ASAP almost all the time and while it doesn't knock the Server over it is slightly wasteful in bandwidth and CPU on both sides.

(1*) game_control is one of the features stuck in the aforementioned and now-archived develop branch. It allows the Viewer to send input from a game controller device to Server-side LSL scripts.


Attachments:
llviewermessage.cpp.patch.txt [12.47 KiB]
Downloaded 384 times
2025-02-22 17:45:37
Profile

Joined: 2009-03-17 18:42:51
Posts: 5971
Reply with quote
Many thanks Leviathan ! :)

I'll include this change in next release.

leviathan wrote:
AFAICT the throttle was never adopted by Cool VL, but eventually it did get into FireStorm and vehicle enthusiasts suddenly noticed their fast twitchy race cars became hard to steer.
As you may already have noticed, I always cherry-pick the changes in LL's code, to try and avoid backporting broken code... If LL's new code is broken, either I reject it, or I fix it (and optimize it) myself in my backport (sometimes right out rewriting the whole shebang from scratch, like I did for LL's COF implementation).


leviathan wrote:
I did test this to make sure I could still move my avatar around however I didn't test any twitchy vehicles
I will likely (like I always do for such, potentially breaking changes), allow a dual-path and add a toggle in the "Advanced" menu to choose between the "good old algorithm" and this new one, in case some users would encounter issues with the latter.


PS: please, be careful with my viewer name: it is Cool VL Viewer, not "Cool VL"; "Viewer" is an integral part of the name, just like "Tower" in "Eiffel Tower".


2025-02-23 13:09:19
Profile WWW

Joined: 2009-03-17 18:42:51
Posts: 5971
Reply with quote
This has been included in the Cool VL Viewer for tomorrow's v1.32.2.38 release, with some changes (fix for my "Spoof mouse look" feature that got partly broken by the patch, and optimizations).

I also introduced a new "MaxAgentUpdateRate" debug setting (defaulting to 125, like in your code where it is a constant), to allow the user to relax this if needed and revert to the "enthusiastic over-send" logic (by simply setting this to 500 or more).


2025-02-28 12:53:27
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.