Tuesday, March 6, 2007

Tool making

Earlier in my Second Life, I started to become familiar with the Linden Scripting Language (LSL). In First Life, I am a software developer, so learning a new programming language is not a big deal. I didn't get very far at the time, though. The list of functions is right there on the LSL Wiki, and the language syntax is pretty much like C++ or Java, but the best way to learn how to apply such knowledge is by having specific tasks to accomplish. Since I didn't have that, I didn't get much past experimenting with individual functions.

As well, I must admit, since it's so much like my FL work, I kind of lost enthusiasm for yet more programming.

A short while ago, however, I noticed Patrice's notecard dispenser, which she has outside her terraforming office. Anyone who uses the posted landmark and drops by the office can click on the notecard dispenser and get information on the services Patrice offers. I have noticed that people also teleport to my office when I'm not there. I figured it was long past due to give them something more than a stained glass window to look at. I was missing potential business opportunities.

You can buy notecard dispensers, but I figured it couldn't be a very complicated thing to program. Turns out it's dead simple. I even added a feature. When someone touches the ball, not only does the person receive a notecard, but I receive a notice of who took the notecard. Cool and useful. Don't worry, I won't be tracking anyone down to badger them about setting up an appointment! For informational purposes only. I made my alt useful as well, as a tester. Sometimes a script will work for the owner but not for others, so alt-boy verified that he could receive notecards as well.

The other night, I was working at the Activ8 club as a dancer for the evening (yeah, I signed on to model, but there hasn't been any modelling work since the tattoo shoot). Not everything is yet set up at the club, and there are no tip jars for hosts and dancers. Yaeh pulled out her own tip jar. I didn't have one. Whine whine. Illya, sweetheart that she is, gave me one. This shamed me into realizing that I could probably build my own quite easily.

A tip jar isn't quite as simple as a notecard dispenser, but it's not much more difficult. It requires a couple more functions, and again I added some features. If you left click on (touch) the jar, it provides instructions on how to make a payment. Help for newbies, should any of them actually have any money to tip. And if anyone sits on the jar, it boots them off. Can't have someone obscuring my tip jar! I also put in a more effusive thank-you message for particularly large tips. Again, alt-boy did the testing.

My latest project was spurred by reading about Chey's trouble with intruders. It's a script that finds all agents within 96 metres (maximum distance) and asks whether the agent should be ejected from the land. It's designed to give the land owner more time to ban the griefer. I don't know if it's faster than going straight to banning, but I think it probably is. This project is still in development.

These are all tiny projects. It's more difficult to design and implement larger projects, and I haven't figured out one to work on yet. However, this is a start, and I've finally done something more useful than determine the height of an avatar.

I might get distracted from further scripting by something I want to use the tip jar for—DJing. My friend ComradeX showed me the ropes, so now I need to rip a bunch of music onto my computer, where it does not currently live. Then maybe someone will let Véronique's Vault come to life. If that happens, don't expect any between-song patter. :)


Michael Keukert said...

Apart from some PHP and shell-scripts, I haven't done "proper" programming since the early 1990ies. But as for you, LSL came as a revelation to me. Everything is pretty simple, and all the right commands are there. The only thing I find "messy" is the use of radiants instead of degrees for angles and rotations, and even then there are simple conversions for that.

You should check out the IBM place. There are lots of scripting ressources and even some sort of contest there. The grid is pretty unstable today, and right now I can't log in at all. next time I'm in I send you the landmark.

Michael Keukert said...

As for DJing: I think it is only a matter of time before there is a copyright crackdown on SL. You might want to check out magnatune.com - they offer their content royalty free for usage within SL.

Véronique Lalonde said...

Hi Michael. On the matter of royalties, it's kind of up to ASCAP, BMI, and similar organizations to track usage in order to calculate performance royalties. Considering the average audience size at a club in SL, I don't think we're talking any kind of serious royalties yet for spinning tunes. Here's some info from a site called "How stuff works."

Mischief said...

LSL has eluded me - much the way building has - primarily because it's far, far too tempting to enjoy the content of others than to spend the time learning how to make my own.

However DJing is one thing I do want to figure out before 'The Man(TM)' gets his grubby hands into SL. I've my big ol' playlist of eclectic wonder that I would love to inflict upon... er... share with the world.

SL DJing would fall under the heading of 'internet radio', and as such would be subject to royalty payments of $0.008 per song, per listener (or roughly 3 lindens for every avatar that's in the room during a song play). So you can expect the royalty bill for a packed to the brim, lag-o-licious sim to be about 2000 Lindens an hour. So not exactly breaking the bank, but it would seriously eat away any tips that were earned.

Michael Keukert said...

I'm a perfectionist. Enjoying others creations is nice, but sooner or later it's either "How did they do that" or - more likely - "Ican do better than this".

As for royalties: most parcels can only hold 50 avis at any given time - very few can hold 100. Asuuming that maybe a third has music switched off, this givey you pretty low listener counters.

But let's be realistic: sooner or later there WILL be a serious effort regarding copyright and/or trademark infringement in SL as well. SL does not violate it so abvious as YouTube or MySpace did. But not a single visit passes where I don't notice at least questionable use of coprighted/trademarked material.

Michael Keukert said...

Oh my, bad grammar day...

Véronique Lalonde said...

Thanks, Mischief. I didn't know the actual assessment rate. I did some calculations assuming a two-hour gig at approximately four minutes per song and maybe 30 people in the room. I came up with a figure close to yours. The economy in SL is a bit skewed. :) But I think it's still up to ASCAP et al. to find you.

As for scripting, sometimes my inner geek asserts itself, and as Michael says, I want it my way (my tip jar looks uglier but works better). As for building, I never really enjoyed it that much until I starting doing houses. Again, that was probably similar to scripting -- much more fun to have a real project (my office, my photo studio) than just to play with prims.

And I still enjoy the beautiful, much primmier buildings that others make. But mine leaves prim room on a first land parcel. :)