Showing posts with label scripts. Show all posts
Showing posts with label scripts. Show all posts

Thursday, February 28, 2013

Rua Whitepaw's Keyboard

By Bixyl Shuftan

While talking to Nydia Tungsten recently about her new radio station for KVXN, she wanted to show me something else. We went to a place at the Angels Estates, and there was Rua Whitepaw, whom had a large keyboard before her that reminded me of the one Tom Hanks was dancing on in the movie "Big."

"THIS is the other news Item I wanted to tell you about," Nydia told me, "She has even been awarded Lindens to continue working on this." Rua shyly greeted us, and then explained how the piano worked. "You can click on the keys to play," she stated, then explained there was another method, "You can say the name of a note in channel 2 chat. So for example /2 C4 … It goes from C2 to C6, and the back notes are with #. So C2 C#2 D2... and so on. You can also combine keys to make chords... try /2 C4 E4 G4." I did, and the result was a short melody.

"The real fun part is that you can write scripts that say the right things at the right time," She explained, "Like this …" And the piano began playing a tune familiar to those playing Nintendo games. She then did a second one from a familiar Russian drop piece puzzle game, though there was a pause, "SL lag sometimes messes it up a bit. … I think it's actually flood protection. You definitely need a lag free sim to make it work right."

When I asked her where she had got the idea from, Rua answered, "I remember seeing a piano that you could play by clicking in Rocket City. But that could only be played by clicking so it was cumbersome and I felt that it limited me in expressing myself musically. So I wondered what if I make something that lets you play several notes at once And then I thought, if I make it listen to chat, then I could tell it to play as many notes as I want. So two days ago I thought I'd try it out to see if I could make it work."

"Then yesterday I made the basic idea, it was the same as now except with less keys, and then I showed it at Rocket City. And they liked it a lot and offered me money so I could improve it and then sell it. I don't think they want to sell it there though. I think they just liked the idea and wanted me to finish it." "I think they do," Nydia commented, "or they wouldn't have given you the money." Rua explained there were expenses in building the keyboard, "each key has its own sound, so that's 10 L$ each to upload. It has 4 octaves and 12 keys per octave... so 48 keys, that's 480 L$ that has gone into it already." Of what Rocket City wanted with the keyboard, "maybe they'll put it out there too so others can use it, like the old piano."

Rua continued, "I guess the nice part is that the sounds can easily be replaced. So if someone has sounds of a proper piano or some other instrument, they can put them in. … I can show you the scripts I used to make those three songs. Basically every note is one message. So if it were to appear in local chat there'd be hundreds of messages. The scripts work by saying the note names, and then waiting a certain time. The shorter the time, the faster the song plays. But it sounds strange when it's too fast, because the sounds all mix together. And it also causes more flooding."

Rua called the keyboard, "more of a proof of concept more than anything. But I like that it works so well. It's amazing what SL can do really. And I'm kind of curious to see what others can make out of it. You can be creative and express yourself with it, that's what I think is important. It opens doors." Nydia was all smiles about her friend and what she had done, "She has done EXTREMELY well, and I am VERY proud of her. She is a VERY smart girl." Later on,  Jasmine Dawn Shuftan saw the piano and commented, "Rua you made a wonderful thing in this, made SL a little more beautiful."

Bixyl Shuftan

Monday, October 11, 2010

Scripts and Lag

I recently had a talk with EriX Oh of the Skybeam Estates. He wanted to discuss something many residents in Second Life don’t seem to be aware of: script lag.

Most residents are aware of the fact that more prims are around, the more lag there is, as each one takes a little bit of processing time. Scripts, however, also take time. So objects with scripts will create more lag than those without. EriX just shook his head at the mention of builders whom obsess with economizing their creations to have the fewest prims possible, yet stuff them full of redundant scripts.

“Many avatars with huge script-times/script-counts, they always tell me Linden Lab is the problem. I say to them they are the first problem. When I then ask the users to detach something or leave, they get angry. And even when I explain in detail, ... they still do not understand it.”

Of the subject on avatars and lag being written about more after the Avatar Rendering Cost (ARC) became available to view as an option, Erix commented, “That’s what many say, ‘Yes, but my ARC is low.’ That’s wrong. Scripts do not count in the ARC, and the ARC is only to detect local lag, not server lag. I must say my ARC may be high, but I’m not hogging the server (grin).”

As the manager of a sim, Erix had tools to help him see how much lag various objects created, sending me a couple pictures, “what you see here are all ‘ heavy loaded’ scripts .... - as this display is only limited to display ~100 scripts at one time. What you see here are times, how much time scripts need to execute.” By “heavy loaded,” he meant scripts particularly long and full of instructions, “and cause a lot of CPU load. The quantity of scripts does not matter if it lags or not, it’s the quality. What I look for often here ... generally speaking for an av, under 1 ms is okay, under 0.5 ms is perfect. When the sim has many scripts to execute, it all raises the times a bit. So on a full sim, I don’t care when I see avs under 1 ms.”

So when does script lag really begin? “Generally it’s a bit by bit feeling. You can’t say that avs over 1 ms are automatically ‘lagger: out!’ You need to think every av, even scriptless ones, cause CPU load on the sim. All objects with and without scripts cause lag. I look first at the sim itself. Are there many people? In a sandbox for instance, over 20 people around means it’s likely to lag. Who has objects with scripts? They cause lag. What I want to say, an avatar with more than 1 ms, is built wrong.”

Erix informed me that the fox avatar he uses most of the time is a modified copy of the original with redundant scripts removed, “removed over 300 scripts ... I’ll put on my original, and show you how ugly the times will be. You can potentially as one av lag a whole sim.” He then changed into his original av, which did seem a little slow to load. At first, the only difference seemed to be it’s use of invisiprims (EriX replaced them). Then he gave me a couple pictures of his sim statistics, and the difference was more obvious, :3.665 on an *idling* sim! Why that happened, if you look at me closely, you’ll see in *every* prim a script: Foxcolor. I counted them - 328 scripts!” These scripts were solely used for changing the color of his avatar fur. Since it was fully modifiable, after choosing a final color he removed all the scripts, “I also got rid of the original HUD, which I counted around 50 scripts.”

I mentioned some of my avatars had the option to change hair color. Erix answered, “Then they MAY have in every hair a script. May, because LL introduced a command in LSL to change child-prims from the root-prim on. So *one* script can change up to 255 child prims.” I changed to a "furry" skunk avatar with had a number of options which required some scripts, including changing hair color, as well as a radar, male AO, and flight feather. Erix looked at the statistics, “still under me (0.342), you’re 0.257. Nothing to worry about from my view.”

“A huge amount of scripts has other side effects. TPs often fail. And lagging, lagging, lagging. And because there's no quick, easy way to remove these scripts, I made a program, this: http://foxreports.lu/software_slavscrm.php . Note that those who use the program: I'm NOT responsible for ANY damage.”

“So girls, with many hairs, check the script-counts, and remove them if not needed.”

We talked a little more, and soon parted ways, me knowing a little more about scripts and lag, and how a sim administrator saw it.

Bixyl Shuftan