History | Log In     View a printable version of the current page.  
  • All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you've read, understood, and agreed to those terms.
Issue Details (XML | Word | Printable)

Key: SVC-58
Type: New Feature New Feature
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Travis Lambert
Votes: 54
Watchers: 11
Operations

If you were logged in you would be able to see more operations.
2. Second Life Service - SVC

New LSL Super-Sensors

Created: 20/Mar/07 02:00 PM   Updated: 11/Feb/08 04:02 AM
Component/s: Scripts
Affects Version/s: 1.13.4, 1.13.3, 1.13.1.5
Fix Version/s: None

Environment: n/a
Issue Links:
Duplicate
 
Relates


 Description  « Hide
Sensors are incredibly inefficient due to detected* bloat. As a result, we have to use many sensors to cover a sim, or to pull back basic Key info for more than 16 avatars - which increases simulator load. We need more optimized versions of highly used (and laggy) LSL functions, that could have the effect of reducing sim load, and give us better data.

Please see the following suggestions from the 'LSL Useful Function Wishlist' on the SL Wiki here: http://wiki.secondlife.com/wiki/LSL_Useful_Function_WishList

llGetAvatarKeysOnParcel()
llGetAvatarKeysOnEstate()

Additionally, a llGetAllAvatarsInSim() type function combined with the existing llOverMyLand() could remove the need for a lot of sensors out there - giving us more accurate agent data and less load on the simulators. A common need is simply to know 'Who is present' on a parcel, and it is difficult to collect this information without many laggy sensors, or an intricate network of collision detectors.


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Thordain Curtis - 29/May/07 07:09 PM
While I agree that llGAKOP and llGAKOE would be extremely usefull, actually creating new sensor-type functions (that are actually sensor functions) would be super usefull. Although llSensor can be usefull in many circumstances, think of the usefullness of something like these:

     llSensorRayCollision: Performs a ray collision test agains world geometry and returns the 16 closest objects that the ray collides with. Ray could easily be specified w/ a vector.
     llSensorSweptSphereCollision: Same as above, but uses swept-sphere (or maybe capsule) collision testing. (w/ vector and sphere radius)

When I say "world geometry" I mean "objects/prims". Although, it might be interesting to be able to see if a ray hits the ground. Maybe a llDetectedStruckGround or something similar could facilitate this.

I don't imagine that either of these calls would introduce a great deal of lag, and I also don't imagine they would be that hard to add. However, they would provide for quite a little bit of usefulness in creating automated scripts. Furthermore, I believe that a properly crafted specialized sensor call could generate _less_ lag than the usual llSensor("", NULL_KEY, ACTIVE|PASSIVE, 96.0,PI) calls that are in just about every single script that uses sensor.

Just my $0.02

-Thordain Curtis

Haravikk Mistral - 21/Jun/07 12:28 PM
Would love to have llGetAvatarKeysOnEstate() certainly. On the issue of llDetected* bloat, a big issue that also needs addressed is the lack of any other way to get the information they provide, as such it would be nice to have more llKey2* calls. I've posted these in SVC-348

Angel Fluffy - 22/Jul/07 10:19 PM
Highly useful. This would eliminate SLBanLink.com's reliance on sensors, thus reducing load on sims as well as being useful from a security point of view.

More generally it would make it far easier to monitor a sim without the use of MANY sensors and relay scripts.

Thomas Shikami - 23/Jul/07 05:54 AM
I linked this to WEB-240 as these functions, especially llGetAvatarKeysOnEstate, llGetAvatarKeysOnRegion would be possible to implement as a capability and from a capability it isn't far to implement as a dataserver event

WarKirby Magojiro - 04/Sep/07 01:58 AM
Why would it need a dataserver event? The information is right there in the simulator. Dataservers are for gathering information about things outside of it, like assets, and agents.

This function should be able to return immediately.

Haravikk Mistral - 12/Oct/07 01:42 AM
One note;
I'd suggest changing the implementation, as the lists returned by these functions could be pretty huge. An alternative would be to do it like object inventory calls:

int llGetNumberOfAgentsInEstate()
int llGetNumberOfAgentsOnParcel()
key llGetAgentInEstateKey(int agent)
key llGetAgentOnParcelKey(int agent)

Or:
int llGetAgentCount(int mode);
key llGetAgentKey(int mode, int agent);

with constants for mode:
AGENT_IN_ESTATE
AGENT_ON_PARCEL

WarKirby Magojiro - 24/Dec/07 04:33 AM
Your implementation idea sounds neat, but I really thintk it needs a monolithis list return form, too. Having all the keys neatly compiled into a list would be very helpful, and cut down on list building. which would otherwise be required to create one

tatiana niven - 10/Feb/08 07:45 PM
That wouldn't be a safe implementation, Haravikk, as you can't be sure no agents entered or left the sim while you worked with the data (i.e. between you asking for data on avatar 3 and avatar 4, avatar 3 might leave, making avatar 4 avatar 3... etc. Headache :)

That said, a monolithic list could be pretty unpleasant - I can envision scripts running out of memory because they picked up a list of 50 keys.

Perhaps implement this in an event. For example, llGetAgentKeys(int mode) could trigger a sensor event (or it's own event) with the data.

Haravikk Mistral - 11/Feb/08 04:02 AM
Hmm, those are very good points. I guess it's not as big of a deal now that Mono is on the horizon, since it has an upper limit of 64k which wouldn't make a list of 50 or even 100 avatars that big a deal, since it would take up around 5.8k tops.

I guess a list would be the best bet then, with a delay to offset the creation of the list. If it comes to it one script could be made that fetches the list, and then feeds the entries into another script one at a time.