You are currently browsing the monthly archive for October 2007.

Recently, stipends in Second Life (for us priviledged folk who actually pay to be maltreated by Linden Lab) have become increasingly erratic, or at least late. They’ve usually been paid in the end, but often two or three days late. Personally, I’m not particularly bothered as I have other sources of in-world income, but I’m
sure there are some people who rely on the regular payments to pay their rent and such-like.

Oddly enough, Linden Lab always seems to be exactly on time taking the tier and subscription payments out of my account. Funny that.

Second Life and Open Croquet

Over the past year or so Second Life has slowly been emerging into the consciousness of the wider world — companies like IBM have taken an interest in it, the entertainment industry has begun to take notice (most notably with the recent CSI episode). Philip Linden’s dream of seeing Second Life take off as the ‘3D Internet’ (or more precisely, the 3D Web) actually looks like a plausible possibility, in spite of all the technical and cultural difficulties that it has faced, and still faces.

Personally, in spite of my long involvement with Second Life (over three years now), and in spite of the fact that, yes, even with all its faults, I enjoy Second Life, the prospect of Second Life becoming the de facto 3D Web fills me with dismay.

Some explanation is in order. Let’s go back to the original Internet. Or, more appropriately, to the World Wide Web (as Second Life more closely resembles the latter – a point I will come back to).

Imagine that instead of being invented by a lone physicist who wanted a simple way of sharing information across the Internet, it had instead been invented by a company. Instead of being open, imagine that it had been proprietory, owned and controlled by one company (yes, I know there has been talk of making Second Life open, but talk is cheap, and Linden Lab’s current business model depends on their retaining ownership of the servers). Imagine that instead of webpages being able to be hosted on almost any machine on the Internet, they instead had to be hosted on the servers of that one company.

Maybe you think that would have been a good idea. If so, I have a bridge you might like to buy…

Now imagine an alternative. Instead of everything being hosted on central servers owned by one company this alternative is open, and anyone with a reasonable machine can host a world (actually, most worlds will probably be fairly small, so let’s call them islands). Each island would be the equivalent of a web-site, or a web-page. As you walk round an island you come across ‘portals’ that let you see into other islands. Walk through the portals, and you end up in those other islands – the 3D equivalent of a hyperlink. Some of these islands will be part of the same site. Others might be anywhere else on the Internet.

Welcome to Open Croquet. There is a lot more to it than I’ve mentioned above. For example, Second Life has long promised HTML on a prim. Open Croquet already has it. In fact, it has editable HTML (or just plain text if you want). For a glimpse of the possibilities, visit the main site and take a look at the video.

So, why aren’t people making the same song and dance about Open Croquet as they are about Second Life? Well, Open Croquet is not without its own problems, the overriding one being that in terms of development it is a long, long way behind Second Life. The avatars are ridiculously primitive – there are groups working on better avatars, but it looks like they will be a long time arriving. Actually connecting to other worlds is flaky to say the least (I have only ever managed to connect to one other world), and my own experience has been very, very laggy, at times almost unusably so. The programming language behind is Smalltalk, which although it might be well suited to Open Croquet is nevertheless a minority language.

In terms of potential, Open Croquet strikes me as being exactly what a 3D Web ought to be, and the fact that it lags so far behind Second Life (and that the speed of development seems so slow) is very frustrating.

It would be very sad if Open Croquet vanished from sight, and Second Life became the standard for the 3D Web, because I think it would mean that the 3D Web would be a pale shadow of what it could have been.

In case I have piqued your interest, I’ll repeat the link to the main site:

Open Croquet Consortium

It’s often useful to have somewhere to store settings for an SL gadget, and a common way of doing this is in a notecard kept in the contents of the main prim.

The script listed below shows a way of reading the contents of a notecard (there is, unfortunately, no way of writing a notecard – you have to do this manually).

You can jump straight to the listing if you want, but I thought this would be a suitable opportunity to address a problem with LSL scripting (or at least one of the problems), namely…

Why Does It Have To Be So Convoluted?

Let’s take the subject of this blog as an example. To read a notecard you have to find the notecard, send a message to the server, set up an event to wait for a reply from the server, and then repeat this for every line that you want to read.

Why can’t you just do something like this?

    line = llGetNotecardLine("notecard", linenumber);

As it happens, there is a very good reason for this, and it isn’t just that the developers at Linden Lab are determined to make life difficult for you!

To understand, imagine that you could do something like the above line. What would happen? Remember that everything in SecondLife, including your notecard, is stored on the server. To get the line from the notecard, SecondLife has to go to the server, find the notecard, extract the requested line, and send it back. If the server is under heavy load, this could take some time (familiar, yes?).

What happens to your script during all this? Well, it is still waiting for the response to come back from the server. In other words, as soon as it hits this line, the script will stop and wait…and wait…and…

You get the picture. Compare this with the actual system. Your script sends a data request to the server, and then carries on. When the server returns the data, the data event is triggered in your script, which meanwhile has been happily going on with any other stuff that it needed to do.

This kind of pattern – send a request, return the data via an event – is very common to multi-tasking environments, and SecondLife is no exception. Without this seemingly convoluted system, your scripts would be much less responsive, and far more susceptible to the effects of lag.

The Script

// Variables
key qryNotecard;
string notecard_name = "Settings";
integer notecard_line = 0;// Routines

    // Make sure we actually have a notecard matching
    // the name. If we do, process it.
    if (llGetInventoryType(notecard_name) == INVENTORY_NOTECARD)

    llOwnerSay("Reading settings. Please wait.");
    // Send a request for the first line (line 0). Any subsequent
    // lines will be requested when the dataserver event is
    // triggered.
    notecard_line = 0;
    qryNotecard = llGetNotecardLine(notecard_name, notecard_line) ;

checkLine(string line)
    // Ignore empty lines and comment lines.
    if(("" != line) && (llGetSubString(line, 0, 1) != "//"))
        // Extract the line details. Assume that valid
        // settings are in the format 'name=value', like
        // a Windows .INI file. Ignore any which are not.
        list Details = llParseString2List(line, ["="], []);
        string keyname = llList2String(Details, 0);
        string contents = llList2String(Details, 1);
        // If we have a valid line, process the contents.
        if (("" != keyname) && ("" != contents))
            // For this demo, we just display the details.
    // Get the next line.
    notecard_line = notecard_line + 1;
    qryNotecard = llGetNotecardLine(notecard_name, notecard_line) ;

// Events
    on_rez( integer r )
    dataserver(key query, string data)
        // Check whether this is a response to our notecard
        // query.
        if (query == qryNotecard)
            if (data != EOF)
                // Handle the returned notecard line.
                checkLine(data) ;
                llOwnerSay("Finished reading settings.");

Trying out the blogHUD postcard-posting facility. If anything, it actually works more smoothly than the main blog feature…

posted by Pyter Morgridge on Caledon Moors using a blogHUD : [blogHUD permalink]

So, here I am sat at home in Morgridge Mansion, testing out blogHUD for the first. Maybe this will encourage me to post more often. We’ll see how I get on with it.

posted by Pyter Morgridge on Caledon Moors using a blogHUD : [blogHUD permalink]

Ok, explanations are in order, in case you don’t know what blogHUD is. It’s a HUD (duh!) that let’s you post brief blogs (not so brief if you use notecards instead of a chat channel) to your own page on the blogHUD site. If you are interested, my own blogHUD page is here.

It also allows you to crosspost to other blog sites (such a this one!). This is a neat feature, but doesn’t quite work as expected, at least for WordPress. The blog entry gets posted as the title of the blog, which is a bit strange. Maybe it works better if you do a post via a notecard — I’ll try it at some point (but creating a notecard for the blog post seems to defeat the object of blogHUD, which is to make it quick and easy to post to a blog from within Second Life).

More later, I suspect.

Another creative gem. A rusting locomotive in a mid-west wheatfield; a cupboard and a table with grapes, a drawing book, and a violin, adding a surrealist touch to the scene (even more surrealistic is what happens if you click the Mad Hatter’s hat half-concealed inside the boiler of the locomotive). You can almost feel the warmth of the lazy summer day.

I don’t know how permanent this scene is, so I suggest you pay it a visit now, while it is still there:

Some Snapzilla pics:

The Locomotive

A closer look

With added surrealism

Lost in the wheat

And once you’ve seen that, take a look around the neighbouring Dreamworld islands, where you will find other creative builds, such as these playful lions: