Wednesday, August 25, 2010


I had a discussion with another developer about the moonphase virtual sculpture. They mentioned a technique that might improve bandwidth usage by using llSetTextureAnim instead of setting the offset of the texture directly. The idea being that llSetTextureAnim would be running on the actual client which doesn't require any bandwidth, while llOffsetTexture is run on the server and all the clients viewing that object need to receive a message that the object change.

So I did some testing with llSetTextureAnim and I couldn't get the same results. When you use ROTATE in llSetTextureAnim then you can't specify the texture offset, only which portion of the texture you want to use. It seems like it is used to have a tiled texture where each section of the tile can be used as an individual tile. In my case, I used a half transparent texture and am rotating that around the sphere. Using llSetTextureAnim I don't see a way to get the same effect. I'm a little slow most of the time so I may be missing something. Here is a screen shot of using
default
{ state_entry()
{
llSetTextureAnim(ANIM_ON | LOOP | SMOOTH | ROTATE,ALL_SIDES, 1,1, 0, TWO_PI, TWO_PI/360);
}
}



I also tried using a non-ROTATE texture animation which only cause the texture to turn on and off when the "tile" reached the non-transparent section.

I really like the idea of reducing bandwidth by having the texture changes run on each client, but don't see a way to get this to work for this sculpture. llSetTextureAnim is definitely a good tool for the tool belt and I'll have to consider some sort of sculpture using a tiled texture. That would mean that each client would see something different on their machine so there couldn't be a discussion about the "current" look of the sculpture between two people, but I'm not sure that's a real problem.

Wednesday, August 18, 2010

Sensor land detection

I recently moved lands and my new neighbor asked if I could turn of my sensor that greeted visitors. I guess it was going off when people were visiting their land.

I first detected the location of the Agent who tripped the sensor. Then get the land owner key at that location. It's hard to tell what that key is so I wrote code to print that out if the sensor detected me, then went into my neighbor's land. Then took that number and hard coded it into the welcome message. Now the sensor will only greet someone if they are on a different land than my neighbors.

sensor( integer number_detected )
{
integer i;
for( i = 0; i < detpos =" llDetectedPos(" k =" llGetLandOwnerAt(detpos);" k ="="" k = "+(string)k); // } //} if ( (llDetectedKey( i ) != llGetOwner()) && (k != ">

Tuesday, August 17, 2010

Moon Phase Second Life Sculpture

I've been working on an art gallery for an internal company sim and also building a couple of small sculptures for it as well. I built this one in the internal sim, then recreated it and improved it in SecondLife. It is a number of concentric rotating half-spheres that also change color.


"moon phase"
Virtual Second Life Sculpture

Monday, August 16, 2010

Beyond Facebook - designing outside the box

Beyond Facebook. - Design Outside The Box.

This is a great presentation on a huge transition that is happening in the game industry and gives a peak on how you can use psychological gaming techniques in everyday interfaces to improve the user experience. The presenter is Jesse Schnell from Carnegie Mellon University. I played this for my class last semester and recently watched it again. There is definitely a lot of good information in here.

Wednesday, August 11, 2010

lsl - Giving a notecard


I was wading back into the Second Life waters after volunteering to help build an art gallery for a group at work. I was also working on a couple of sculptures.

One of the things I wanted to add was to have my object give a notecard to someone who clicked on it.

This was simple.
First. Create a new notecard in your inventory.
Drag it into the content of the object you want to give that notecard.
Let's say it's called "Light Hand Sculpture - notecard"

Add this script and it will give the notecard to someone who clicks on your object.

default
{
state_entry()
{
}
touch_start(integer total_number)
{
llGiveInventory(llDetectedKey(0), "Light Hand Sculpture - notecard");

}
}


Here is the sculpture I was working on. It is on a private sim so I can't give you a link to see it. Sorry.


"Light Hand"

Tuesday, August 10, 2010

Traded land

The land I was using had all the land around it purchased by one person who was trying to create a cohesive sim. I was the last hold out and not because I was being stubborn, I just haven't logged on for a long time because I've been focused on XNA. I agreed to trade the land for something comparable. It turned out this was pretty simple for her to find and I traded my land.

New location: