Jump to content
  • 0

llSensorRepeat() Server Load


Madelaine McMasters
 Share

You are about to reply to a thread that has been inactive for 1470 days.

Please take a moment to consider if this thread is worth bumping.

Question

Hi, Kids!!!

A decade ago, I dabbled with "reactive artwork" that responds to the proximity of the viewer, using llSensorRepeat() to drive changes in size, transparency, position, color, etc. in the object as people approach or retreat from the artwork. I'm noodling with these things again, and wonder if I might improve them before I give copies away to friends.

The artwork must be fairly responsive to be enjoyable, so I used repeat rates of as little as 300-500ms. To reduce server load when nobody is near the artwork, the no_sensor() handler throttles back the scan rate to once every 10 seconds. It then takes up to 10 seconds for the art to first "see" you, after which it responds quickly again. I also have a touch toggle to enable/disable scanning, and I'm considering another level of dial back that reduces the scan rate to once every five minutes if the 10 second scan finds nobody for two minutes. I do limit the scan volume to only what's necessary.

Does anyone think my artwork will be too burdensome on the servers? 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

I don't think this is the most efficient way to do this now. Rather, you might monitor all the avatars on the parcel with llGetAgentList and use llGetObjectDetails to keep track of their immediate proximity to the artwork. You might still tweak the intervals to respond to whether there's anybody at all on the parcel. (One might wonder, though, if lag befalls a region and there's nobody there to feel it, is it really lag?)

One thing about this, though: sensors always return the nearest detection first, whereas there's no particular order to the return value of llGetAgentList.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1470 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...