Background:
Here are my ideas, and all the stuff I ran into...
Idea 1:
Multiple sensoring objects, placed around the place. Communicate via link messages. Advantage: Low lag. Disadvantage: Impossible. Liked objects to far from each other... You'd have to blow a dozen prims on building 10m long wire-prims to connect it all. Not neat.
Idea 2:
Multiple sensoring objects, placed around the place. Communicate via shouts. Much laggier. Much harder to make secure when trying to avoid other people sending false messages. Possible, but very annoying to do, and laggier. Not neat.
Idea 3:
Create a roaming robot. One single prim - that flies around with llMoveToTarget() and scans at certain coordinates. Advantages: All communications problems avoided - by eliminationg the need for it. Impossible! You can only use llMoveToTarget() for distances of, like 50 meters... If you want to fly all over - you need to repeat shorter move commands over and over and over - which lags the place unnecessarily. Not neat.
Idea 4:
Same robot - but non-physical. Just use llSetPrimitiveParams() to teleport around! Impossible! You can only move a prim 10 meters! Instead, you must repeat the move a dozen times like this, by "spamming" orders into the llSetPrimitiveParams() function:
CODE
warpPos( vector destpos )
{ //R&D by Keknehv Psaltery, 05/25/2006
//with a little pokeing by Strife, and a bit more
//some more munging by Talarus Luan
//Final cleanup by Keknehv Psaltery
// Compute the number of jumps necessary
integer jumps = (integer)(llVecDist(destpos, llGetPos()) / 10.0) + 1;
// Try and avoid stack/heap collisions
if (jumps > 100 )
jumps = 100; // 1km should be plenty
list rules = [ PRIM_POSITION, destpos ]; //The start for the rules list
integer count = 1;
while ( ( count = count << 1 ) < jumps)
rules = (rules=[]) + rules + rules; //should tighten memory use.
llSetPrimitiveParams( rules + llList2List( rules, (count - jumps) << 1, count) );
}
That ought to increase server load unnecessarily too, don'tcha think? Not neat.
Idea 5:
Ok... Idea 5 - and this was something I had given up on when idea 3 fell through. Wouldn't it be neat if the bot flew up to trespassers and introduced itself? It's possible you know - by adapting the simplest of "flying following pet"-scripts.
It's also dumb as hell when you think about it... I was expecting that once my llSensor() sweep detected an avatar and I got the key - there would be a low-lag llGetAvatarPos(key) function so I could chase it down - but there isn't! Not even for use over MY land! Instead, you have to do what all the following-pet scripts do - spam out llSensorRepeats at high rate. That is SO not good.
Ok. Suggestions:
1) Raise the range of llMoveToTarget() to 256m. Let it work all over a sim. Good: Reduce repetetive scripts and reduce lag. Bad: *shrug* We can already do it. It just eats CPU.
2) Raise the range of llSetPrimitiveParams() to 256m. Let it work all over a sim. Good: Reduce repetetive scripts and reduce lag. Bad: *shrug* We can already do it. It just eats CPU.
3) Add llGetAvatarPos(key avatar) and return a vector. Good: Less need for very laggy sensor sweeps in all kinds of following. Bad: *shrug* We can already do it. It just eats *lots* of CPU.
4) Raise effective distance of linking objects together. Good effects: Safe, effective, and low-lag communications. Bad: Not sure here. I just have no clue. Is it bad somehow? You should still be able to do this with invisible phantom prims - yeah? It would just need less prims.
----
Just some thoughts. All these things struck me as SO odd. It's like LSL was *designed* to make people create laggy fixes for linguistical shortcomings. I think these issues need to be adressed (along with a million others no doubt, but these are the ones I have found.)
I guess I could jsut be failing to see a bigger picture here. Is there some reason for all these limits that just seem,... inconvenient? Is it just leftover bad LSL, or is this all intentional?
Ariya Draken