Subscribe

Extending LSL

Written on April 15, 2008 by Katherine W. Prawl

LSL, or Linden Scripting Language, was originated by Linden Lab, the creators and owners of SecondLife™. It is remarkably easy to use, and can allow “residents” of SecondLife and OpenSim based virtual worlds to do many marvelous things in these 3D environments. (OpenSim is the open source version of SecondLife’s server software.)

One of the things people have been clamoring for in SecondLife for as long as I can remember (back to about July 2005, when I first rezzed into that world) is “Web on a Prim”. A prim is a primitive object, like a representation of a 3D cube or sphere or cylinder. These are the building blocks out of which all the incredible representations of physical objects are made in 3D virtual worlds. By combining them, twisting and resizing them, “painting” them with textures, linking them together and embedding little scripts in them, all the wonders of the grid are made manifest.

All, that is, except for a functioning Web browser that an avatar can share with others in the world. The latest version of the SecondLife viewer, the client software that enables one to enter these virtual worlds, offers at last a rudimentary Web viewer, but it can only display a single page with no live links. Hypertext without hyperlinks is almost useless, but of course it is a step in the right direction, and better than anything that preceeded it.

In one of the derivative VWs I’ve joined recently, though, they have taken LSL a step further. As well as implementing most of the commands from that scripting language, a few home-grown functions are added. One specifically enlarges the ability to display Web pages on primative objects, chosen by anyone in the world, not just someone who has control of the media on the land parcel where the object exists as is presently the case in SecondLife. For the geeks among us (you know who you are), this function is called osSetDynamicTextureURL() and it allows a “voice” command to be used to surf to any given URL. Where native Linden LSL commands follow the convention of having their names preceeded by “ll” (two lower-case letter Ls), as in llSetText(), the OpenSim scripters have used os[Function name] to identify those that are not from Linden Lab. I’ve tried out an object that uses a script with this function, and it works quite well. However, when I tried to make my own Web display object using a copy of the script I found in the user’s forum on the OSGrid.org website, it did not work; I don’t know why. Perhaps the copy has a typo I’m not proficient enough to spot, or maybe the grid was just being a bit unstable at that moment. It is still alpha software, after all.

Still, even if I couldn’t make my own Web display (yet!), the fact that LSL is being extended in OpenSim grids is very encouraging.

Also encouraging is the fact that I heard from a friend tonight that a mutual acquaintance is also planning to install Sun Microsystem’s open source Darkstar server to run a Project Wonderland region on his own computer, as I hope to do soon. This is becoming the favorite indoor sport of the really extreme VW addicts on the block! I’m one step closer now, since I finally located the package I need to install Java6 SDK on Debian Linux, a requirement for running Darkstar.

If you enjoyed this post Subscribe to our feed
 

Leave a Reply