Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

More client side scripting ability

Would you like to see more client side scripting ability in Second Life?

Strong Yes
6 (66.7%)

Yes
1 (11.1%)

Maybe/Don't know
1 (11.1%)

No
0 (0.0%)

Strong No
0 (0.0%)

Don't care
1 (11.1%)

Total votes: 9
Candle Hazlitt
C.D.S.V. Owner
Join date: 6 May 2006
Posts: 25
05-28-2006 20:45
Client side scripting takes less bandwidth and reduces lag. Bandwidth = money. It would be an economically wise decision for Linden Labs to enable more client side scripting ability. The reductions in bandwidth usage, load on the asset server, and lag would be very significant. It makes me wonder why this has gone so long without really being implemented. The sooner Linden Labs implements this, the less money the will have to spend on bandwidth.
Eep Quirk
Absolutely Relative
Join date: 15 Dec 2004
Posts: 1,211
05-29-2006 02:15
While I agree about SL needing more client-side scripting (particularly for doing smooth movement like llTargetOmega does for prim rotation and llSetTextureAnim does for texture animation), I don't think it would affect bandwidth THAT much.

/13/33/93040/1.html

SL wastes so much bandwidth in MANY other areas besides scripting I'd rather have LL improve THOSE areas first:

http://tnlc.com/eep/sl/index.html#improvements
/142/fc/102040/1.html
/invalid_link.html
/invalid_link.html
/120/91/30754/1.html
/13/9e/9750/1.html
_____________________
Pentium D 820 (2.8GHz), 2GB PC4200 (533MHz) DDR2 RAM, BFG GeForce 6600GT 128MB
Candle Hazlitt
C.D.S.V. Owner
Join date: 6 May 2006
Posts: 25
05-29-2006 07:32
Not only does it effect bandwidth but client side scripting is MUCH faster than server side. So many more things could be done with it.
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
I'd like client-side scripting, yes.
05-29-2006 09:31
I don't know what you people mean by "more client side scripting", because there's none right now. Some of the primitive parameters and attributes produce fairly complex client-side effects, but it's all strictly attribute-based. There's no ability to actually run scripts on the client side.

The client doesn't include an LSL interpreter, and I'm not sure it should... the client doesn't have to run thousands of concurrent scripts, and could use something like Javascript instead.

Note that this isn't anything to do with "HTML on a prim". HTML on a prim would run scripts that are isolated from the SL environment, they wouldn't have any access to the grid or to the client's knowledge of the world. I'm talking about stuff like...
CODE

// LSL code fragment
if(llGetPermissions() & PERMISSION_CLIENT_SCRIPT) {
llClientScript(SCRIPT_NOTECARD,"facing.js");
llClientScript(SCRIPT_IMMEDIATE,
"target_prim.key = '"+((string)llDetectedKey(0))+"';");
}

// JS code fragment
if(target_prim.valid) {
if(!self.attached)
self.lookat(target_prim,0.1);
else
self.attached.lookat(target_prim,0.1);
}
Drake Bacon
Linux is Furry
Join date: 13 Jul 2005
Posts: 443
05-29-2006 09:43
I also agree with this -- having a express client-side-only LSL or Mono script (in 2.0) could overcome some limitations with the flexprims (you can't join two flexprims and have it act like just one). We'll need some communications betwen server and client, but it should give us enough rope to work nicely.
Eep Quirk
Absolutely Relative
Join date: 15 Dec 2004
Posts: 1,211
05-29-2006 15:08
From: Drake Bacon
I also agree with this -- having a express client-side-only LSL or Mono script (in 2.0) could overcome some limitations with the flexprims (you can't join two flexprims and have it act like just one). We'll need some communications betwen server and client, but it should give us enough rope to work nicely.
Client-side-only LSL wouldn't do anything for flex prim joining, Drake: According to this post:
From: Yedwab Linden
In order to attach objects to the end of a flexible object, we need complete hierarchy. This is a separate feature which we're not currently working on, but should happen sometime in the future and which will enable attaching things to the end of flexible objects automatically.

Flexible objects are currently not elastic (that is, they maintain their initial length). To make both ends fixed creates a problem either with excessive elasticity or instability, and these are issues which were not in the scope of "Flexible Objects 1.0". (hint, hint)
http://secondlife.com/badgeo/wakka.php?wakka=flexible for more info.
_____________________
Pentium D 820 (2.8GHz), 2GB PC4200 (533MHz) DDR2 RAM, BFG GeForce 6600GT 128MB
Eep Quirk
Absolutely Relative
Join date: 15 Dec 2004
Posts: 1,211
05-29-2006 15:11
From: Candle Hazlitt
Not only does it effect bandwidth but client side scripting is MUCH faster than server side. So many more things could be done with it.
Yes but remember the POINT about server-side scripting is to keep things in-sync with ALL clients in the area of (visible to) the scripted prim/object. Functions like llTargetOmega, llParticleSystem, and llSetTextureAnim show that not ALL functions NEED to be COMPLETEY in-sync with ALL clients so there's really no reason smooth positioning can't at least be added too (without having to make the prim/object physical).
_____________________
Pentium D 820 (2.8GHz), 2GB PC4200 (533MHz) DDR2 RAM, BFG GeForce 6600GT 128MB
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
05-30-2006 03:43
Really all I think we need is an llSetRot() function that also has a time parameter that the client uses, that way you can smooth tail movements and such. For the purposes of collision though the movement would be considered to have occurred instantly on the server-side, so you don't have to working it out based on the moving object.
_____________________
Computer (Mac Pro):
2 x Quad Core 3.2ghz Xeon
10gb DDR2 800mhz FB-DIMMS
4 x 750gb, 32mb cache hard-drives (RAID-0/striped)
NVidia GeForce 8800GT (512mb)
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
05-30-2006 18:19
From: Eep Quirk
Client-side-only LSL wouldn't do anything for flex prim joining, Drake: According to this post
Client-side-only scripting could easily fake flexiprim joining, with a few extra calls.

vector llGetClientSidePos(integer side);
Returns the offset of the centroid of the indicated side from the center of the prim.

This information is available only to the client for flexiprims.

llSetClientPos(vector offset);
Moves the client's idea of this prim's location to the indicated offset.

And similar calls for rotation.

Then you could write the following code:
CODE

vector client_pos;
vector default_offset;
integer MY_PARENT_PRIM;
integer MY_ATTACHED_SIDE;

client // code executed in the client only
{
state_entry()
{
llSetTimerEvent(1.0 / 60.0); // Or use llGetClientFPS();
client_pos = llGetLocalPos();
}

timer()
{
llMessageLinked(LINK_SET,0,(string)(llGetClientSideOffset(0)),NULL_KEY);
llMessageLinked(LINK_SET,3,(string)(llGetClientSideOffset(3)),NULL_KEY);
}

link_message(integer from, integer side, string offset, key k);
{
if(from == MY_PARENT_PRIM && side == MY_ATTACHED_SIDE)
{
if(default_offset == ZERO_VECTOR)
default_offset = (float)offset;
else
llSetClientPos((float)offset - default_offset);
}
}
}
This fakes the hierarchy and is pretty manual, though you could easily automate it a lot more.