• 24Nov

    Serving simple HTML by LSL script

    I’ve written an LSL script which “serves” custom-generated HTML via a neat trick I discovered. But don’t bust out the champagne just yet — this method is extremely limited, so I don’t expect this to revolutionize HUDs or anything like that. Still, it’s a fun curiosity.

    The trick is this: If you use text of the form “data:text/html,[html code here]” as the web URL, Firefox (and maybe other browsers?) will render the HTML code as a web page. For example, visit data:text/html,<html><body><h1>Oh hai!</h1></body></html>, and Firefox will render the words “Oh hai!”. It’s not accessing a web page, and it’s not loading a local HTML file, it’s loading the HTML code from the pseudo-URL.

    The same trick works in SL as well, by setting the parcel media URL to the “data:text/html” string. You can use an LSL script to generate the HTML code and set the parcel URL, or even set the URL for an individual avatar. The result is that your LSL script acts as a very simple web server!

    However, as I mentioned, there are some serious limitations: SL won’t let you set the web URL to a string longer than 254 letters! That means you have to cram all the HTML code into that tiny string, which severely limits the complexity of the HTML you can display.

    Another problem is that the method may not work for other web engines besides Firefox / Mozilla. Linden Lab is (or was recently) working on switching to WebKit, the engine used by Safari, for rendering HTML. That’s good news, since WebKit is some great software, but this little trick might stop working when they switch. So, I wouldn’t rely on it.

    So, I don’t expect this method to be more than a silly toy for programmers to play around with. But it is that! And on the plus side, there are signs that we might get proper HTTP server functionality in LSL sometime in the future, which would be a great boon to many scripting industries in SL.

    You can get a full-perm copy of the object and script in SL at my sandbox or copy the following code (below the fold, if you’re viewing this on my blog front page) into an LSL script in your own object (in which case you should apply the “*Default Media Texture” to your prim from the Library, or you won’t see anything). Continue reading »

  • 02Nov

    Tired of those beautiful, photo-realistic sunsets? That new-fangled Windlight rendering engine slow your compy to a crawl? Want to relive the good old days, back when voice chat was new and strange, and Linden Lab even bothered to pretend to communicate with its customers?

    Well now you can!

    … Actually, you’ve been able to do so for a long, long time — ever since the Día de Liberación back in summer 2007. One of the benefits of “message liberation” was that you wouldn’t need to download a new SL viewer just because they made some server changes; old viewers would continue to work with new sims.

    And in fact, that has held true, even to today. The only thing stopping you from using a 1.18-series (pre-Windlight) viewer is that annoying “You must download the latest version to continue” message, which is easily bypassed with a trick I’ll describe below.

    But what of that mandatory security update in early October? Or the security update and protocol switch from UDP to HTTPS less than two weeks before that? Wouldn’t those issues prevent old viewers from connecting?

    Apparently not. As of this writing, even 1.19 and 1.18 viewers (but not 1.17 or other older, “unliberated” viewers) can connect to SL with nary a hitch, though they’re probably still susceptible to the security issues mentioned above. As usual, the purportedly required updates are, in fact, not.

    So, what is this trick, this secret knowledge needed to bypass the download prompt and log in with older viewers? Change the channel. It’s an old trick, though there was some concern that it wouldn’t work anymore since the change to HTTPS. Fortunately, those concerns have not come to pass, and the SL servers seem perfectly happy to use UDP with older viewers.

    Changing the channel is easy. The viewer application takes a parameter, “–channel CHANNEL”, which sets the channel to use. The process for giving that parameter varies between operating systems. The processes are described on the SL wiki, but I’ve included a brief overview below.

    • Windows: Create a shortcut to the older SecondLife.exe. Open up the shortcut’s properties (right click > Properties) and edit the shortcut path. After SecondLife.exe but before the closing quotation mark After the closing quotation mark, add: --channel Happydays
    • Mac: Open up the terminal and run these two commands (adjust the first path if your Second Life app isn’t in Applications):

      cd "/Applications/Second Life.app/"
      echo "--channel Happydays" >> Contents/Resources/arguments.txt

      (Mac users, leave a comment if the above solution didn’t work for you. I don’t have a Mac handy to test it!)

    • Linux: Run the viewer as: secondlife --channel Happydays

    You should now be able to log in to SL with your retro viewer version. Enjoy, good night, and good luck!

    P.S. Don’t have the installer for the old viewer laying around? No worries, they’re still available for download. Mad props to McCabe Maxsted for putting that wiki page together!

  • 19Dec

    In Part 1, I talked about the different states a JIRA issue can have, as well as the different resolutions and what they mean. Today, I’ll walk you through the life of an issue, from the time it’s opened to the time it’s fixed and released. I’ll also talk about some of the challenges the JIRA process faces as it turns from an inward-facing tool to be used by trained software developers, to an outward-facing tool to be used by the general public.

    Continue reading »

    Tags:

  • 15Dec

    If you used the SL Public JIRA (highly recommended for all Resis, it’s neat!) then you might be familiar with the various states an issue can have. But you might not really know what those states mean.

    What’s the difference between “Resolved” and “Closed”? When is something “Fixed”, and why do some issues seem to get stuck in “Fixed Internally” for a long time?

    Read on to find out!

    Continue reading »

    Tags:

  • 01Dec

    This should help anyone who wants to make images to be displayed in the SL (classifieds, picks, etc.) and not have them be horribly stretched or squashed by Linden Lab’s inconsistent use of image aspect ratios. I don’t bother to cover aspect ratios for textures to be used on prims, as the proper aspect ratio in that case depends entirely on the prim’s dimensions.

    If you’re making an image for…

    • a classifieds listing … use 10:7.
    • a parcel snapshot … use 10:7.
      (But know that it will be stretched horizontally in people’s picks.)
    • your own pick … use 16:9.
    • a 2nd life profile … use 4:3.
    • a 1st life profile … use 1:1.
    • a group insignia … use 1:1.
    • an invitation or ‘view me’ image … use powers of 2.
      E.g. 64, 128, 256, or 512 pixels wide/high.

    List of Aspect Ratios & Notable Places They Appear

    • 16:9 (1.78:1) — Profile (Picks)
    • 3:2 (1.5:1) — About Land (Options / Snapshot)
    • 10:7 (1.43:1) — Search (Classifieds, Popular Places, Land Sales, and Places), About Landmark
    • 4:3 (1.33:1) — Profile (2nd Life)
    • 1:1 (1:1) — Group Insignia, Profile (1st Life)

    Corrections? Questions? Tips? Leave a comment!

    Update, Dec 6:

    • Torley pointed out that Profile Picks are 16:9 (1.78:1), rather than 7:4 (1.75:1) as I had previously thought.
    • Lex Neva pointed out that 40:28 is equivalent to 10:7.
    • I’ve also corrected About Landmark, which displays at 40:28 (1.43:1), rather than 4:3 (1.33:1). Accordingly, I’ve changed my recommendation for parcel snapshots to 40:28 instead of 4:3, as it does not seem to be displayed anywhere at true 4:3.
  • 22Sep

    Vint Falken has a very good tip for SL photographers who want to hide poseballs and other obstacles from a composition without time-intensive photo-editing.

    But, she opines:

    Note: I’ve tried this on avatars and prim clothing and it does not work on those. Bummer. :p

    Well, glorious day and jubilations, because I’ve found a way that it will work! Just toggle on `Client > Character > Character Tests > Allow Select Avatar’, and you’re ready to go! You can now select avatars and their attachments — and so, in combination with the `Client > Rendering > Hide Selected’ option, you can hide them!

    Here’s an example: This annoying avatar was absolutely ruining my composition:

    Shot With Avatar

    So, I selected her and her prim hair, thus dramatically improving the quality of my snapshot!:

    Shot Sans Avatar

    Unfortunately, to hide the avatar and all attachments, you have to manually select each attachment (luckily not each individual prim!), which can get tedious!

    Fortunately, with the `Allow Select Avatar’ option turned on, you can just select the offending avatar and move it (along with all its attachments) somewhere else where it won’t be in your way! The movement is client-side only, so if the avatar moves (walks, turns, jumps… animation movement doesn’t count), the server will send an update to your client and the avatar will pop back into its old position. But, it should be enough to get your shot in!

  • 25Jun

    “Edit Linked Parts” Menu Item (new in 1.17.1.0!)

    You might notice a new entry in the Tools menu for SL 1.17.1.0: Edit Linked Parts!

    That’s right, the feature I added back in March and submitted to the JIRA has now made its way into the official client release! The menu item works just like the checkbox in the Build/Edit floater, allowing you to switch between editing whole linked sets of prims, or editing the individual members.

    Not good enough? You want more?

    Well then how about I tell you guys how you can add your very own keyboard shortcut… in just 3 easy steps?

    1. Open the Second Life/skins/xui/en-us/menu_viewer.xml file in your favorite text or XML editor.
    2. Go down to line 695 (or do a search for “Edit Linked Parts”) where it says shortcut="", and type in your shortcut between the quotation marks! For example, to bind it to Shift-L, you’d type in shift|L!
    3. (Re)start Second Life, and enjoy!

    A word about the format for shortcuts: Put the modifier keys first, separated by the pipe character, | (Shift-Backslash, above the Enter key). The standard order for modifiers is control|alt|shift, but I’m not sure the order matters too much. For Macs, “control” means the Command key.

    Tags:

  • 14May

    One of the small tweaks I’ve done to my client is to increase the precision that is displayed in the edit window for object position. The normal client only displays 3 digits of precision, while mine displays 5 (this makes me 1000× better at building, I think! Or else 0.001×… Hmm!). (If you want to change this yourself, just edit skins/xui/en-us/floater_tools.xml around lines 588-596. Just change where it says decimal_digits="3" to decimal_digits="give me plenty plzkthx"! You can do it for size and rotation and other stuff, too!)

    In addition to being a darn spiffy development in itself, this tweak has revealed an interesting little factoid about prim position and prim drift… which I will reveal after the fold!
    Continue reading »

  • 10Mar

    Open source is all about sharing what we learn! I have been helped in the past by this wonderful process, and I have found that it gives me warm fuzzy feelings inside to help keep it going by being helpful and sharing with the world! Yay! Hugs for everyone!

    Continue reading »

    Tags:

  • 22Jan

    You know that really loud and annoying typing sound? The one that plays whenever anybody starts to chat? The one that used to ruin in-world live music events? The one you muted all sound effects to get rid of?

    Yeah, you know the one. Well guess what: you can replace it with the sound effect of your choice, or just get rid of it entirely. You don’t even have to change any code in the viewer source; we could have done this all along. (Which really rubs salt in the wound, doesn’t it?)

    Here’s how:

    1. Enable the Client and Server debug menus with Ctrl-Alt-Shift-D.
    2. Client > Debug Settings (second entry from the bottom)
    3. Type or find “UISndTyping” in the drop-down menu box.
    4. To get rid of the typing sound: clear the text entry box at the bottom. To use a different sound file, paste its UUID into the text entry box. (You can get a sound’s UUID by right clicking it in your inventory and choosing “Copy Asset UUID”.)

    That should save the setting to your user_settings.xml file:

        <!--Sound file for starting to type a chat message (uuid for sound asset)-->
       <UISndTyping value=""/>

    This only changes what you hear from your own client, which means everyone else will hear whatever they set. And best of all, you won’t hear typing from other avatars, either! Now that’s music to my ears!

« Previous Entries   

Recent Comments

  • Alas, I didn't program in any way to import a BVH file onto ...
  • I`ve got the same problem. How is it possible to import ...
  • Sadly, the Mac trick didn't work and I've got to deal with s...
  • Thanks Jarek. I've updated the link in the article. :)...
  • yeah, it is http://www.secondlife.sk/EVA of course, not SECO...