I just read the most exciting news by Frans Charming on SLOG about a discussion during the Mono Office Hour regarding interactive user interfaces on a single prim face.
Essentially, scripters in Second Life have long wanted to be able to tell exactly where an object has been clicked, rather than simply which object was clicked. There is currently no way to gather that information, which is why if you look at any HUD attachment with what appears to be multiple buttons in View Transparent (CTRL-ALT-T) mode you’ll see that each button is a different prim.
By creating new LSL functions (NOT just for MONO, despite the fact that this was discussed at a Mono Office Hour) that return both region-relative world coordinates (llDetectedTouchPos) or uv-mapped texture coordinates (llDetectedTouchUV), Second Life content creators will be empowered to make much more functional user interfaces without as many prims.
Already my mind is churning out reams of ideas of how this could make scripter’s lives a little better, but quite naturally the very first thing that occurred to me was that the ability to gather per-pixel touch information on a prim will enable the final stages of html-on-a-prim, which seems to be born out by the actual (heavily edited) transcript :
Periapse Linden: Ok, so our special guest today is Qarl.Qarl Linden: woo.Periapse Linden: The Linden who brought you sculptiesSeifert Surface: yay.Siann Beck: Hello QarlQarl Linden: hey all.Periapse Linden: He’s back with a great new idea he’d like to get feedback on.Qarl Linden: so i have to give credit where it’s due -Periapse Linden: So go ahead Qarl and tell us about Detected TouchQarl Linden: Seifert originally asked for this feature a year ago.Vincent Nacon: yeah I believe I fed him some of those ideas…. if he checked his email
Qarl Linden: i got sidetracked and didn’t get to it ’til now.Qarl Linden: https://wiki.secondlife.com/wiki/LSL_Touch_PositionQarl Linden:
Seifert Surface: i think people have been asking for it from waaay back in the dayQarl Linden: yeah, true.Vincent Nacon: yeah I’ve been wondering how that will workQarl Linden: what we’ve got here is the ability to get more information about touch events.Vincent Nacon: by polygon?Qarl Linden: you get to know where on the surface, and where in world the touch occurs.Qarl Linden: you get the face number as well.Vincent Nacon: err… how many faces are there?Qarl Linden: it’s continually updated as the mouse is held down - so you can implement dragging.Qarl Linden: 6 faces on a cube - etc.Seifert Surface: vincent: faces as in faces on a primChance Abattoir: Where on the surface, that’s rad!Seifert Surface: 1 face on a default torusQarl Linden: and the POSITION, as well.Vincent Nacon: oh was thinking about sculpty partVincent Nacon: muhahahaha!Qarl Linden: texture coordinates, etc.Siann Beck: That sounds awesome.Qarl Linden: right now we’re asking for feedback - make sure we don’t miss anything important.Seifert Surface: presumably if we ever get 2 sided planar sculpties, theyd have 2 facesQarl Linden: presumably.
Seifert Surface:
Vincent Nacon: wait… didn’t we already have something like thatVincent Nacon: the drag I thinkQarl Linden: there’s a similar call: llDetectedGrab().Vincent Nacon: yeahQarl Linden: but it’s not so good for a variety of reasons…Rex Cronon: list llDetectedTouchAll()Vincent Nacon: yeah, tried to make a joystick imput by using thatVincent Nacon: input*Qarl Linden: it reports movement relative to the camera position…Vincent Nacon: yeahQarl Linden: not so useful.Vincent Nacon: it was neat at first but mehQarl Linden: now you’ll be able to put an entire GUI into a texture, and determine with the position info which button was clicked.Qarl Linden: chess boards, for instance - won’t need 64 prims.Seifert Surface: the continual updating works with the touch event firing lots right?Siann Beck: That’s awesome. A lot of vendors can be re-designed.Qarl Linden: exactly.Vincent Nacon: so… if we’re going to have touch_position on surface, what does it means for html-on-prim?Seifert Surface: rightMbrb Rau: 1 prim vendors…Qarl Linden: yes - that’s one of the motivations for this work -Qarl Linden: so that prim web browsing will be easier for us to implement.Vincent Nacon: yeah, figuredVincent Nacon: well that’s good, hope it won’t be much of a problem with flashQarl Linden: naw - it’ll still be controlled with parcel media…Rex Cronon: could it be possible for a script to load a notecard that has html code on a specific face?Qarl Linden: flash is hard because mozilla has a truly horrible plugin interface.Vincent Nacon: now that’s a thoughtQarl Linden: we’re looking at webkit and others for that…Qarl Linden: maybe notecard->html … but that’s not REALLY useful…Vincent Nacon: so how the position will work? gobally or local?Seifert Surface: rex: really you want to be able to alter the webpage on the fly from a scriptQarl Linden: only if you can’t get your own webpage.Seifert Surface: say for a scoreboard or somethingQarl Linden: yes. exactly.Qarl Linden: but you can do a LOT by passing parameters to a webpage in the URL.Rex Cronon: i want to have display that is not connect to a web pageVincent Nacon: and for non-flat surface… how will that set the local position? based on UV map maybe?Seifert Surface: html file in a string?Qarl Linden: i’ve seen an example where HTML is in the parameter…Qarl Linden: yes - it’s the UV map.Vincent Nacon: ah ok perfectChance Abattoir: When will this script go into testing?Chance Abattoir: functionQarl Linden: soon - i’ve got the implementation finished - just a couple more tweaks.Qarl Linden: a month timeframe, i think.Qarl Linden: but no promises.
Periapse Linden: 1) We are going to start the Big Merge of Mono with havok4 next week
Popularity: 36% [?]






That ability would help with my Go board, as I could then have click-to-place without needing an invisible prim at every location.
Colin’s last blog post..Mono Listener Performance Update
I was thinking of your Go board as I read that transcript, yeah.
Speaking of which, have you looked at XYText? If you weren’t absolutely dedicated to using prims for the stones, you could probably quite easily convert such a system for use on your Go board.
Though… I gotta admit, using prim stones but with click position detection would pretty much rock
I haven’t heard of XYText, but I will look into it.
I’m pretty optimistic about Havok4 and Mono being deployed on the main grid. Especially Mono, I think that is going to do wonders for the lag in places like Toxian and CoLA, where lag noticeably sky-rockets when people start shooting.
Colin’s last blog post..Mono Listener Performance Update
I just sent you a copy of the scripts as well as a demonstration object in-world. I’m sure it will all be pretty easy to figure out, but feel free to send me any IM if you have questions.
Maybe you could use something like that to offer two versions, one very low-prim for folks that only have a 512 plot with few prims left over (or a demo version), and the “deluxe goban” version?
Just a thought
Mono is currently absolutely unusable for many of the complex scripts that already exist, so I think (hope!) that it will remain on the Beta grid for some time yet.
I wonder how they’d do an Early Adopter Program for that? I don’t see how it would be possible.
Curious but in what kind of ways would llDetectedTouchPos effect C:SI weapons or the HUD do you think?
The HUD could be made with fewer prims as well as fewer scripts, for starters. That adds up, and would be good for any busy sim.
Also, things like the new clan board could be redone, possibly more user-friendly and with enhanced functionality.
HTML on a prim would give us the ability to have interactive leaderboards in-world, perhaps even with the ability to drill down into more detailed data.
Samurai Island could benefit tremendously from the ability to use single-prim vendors, presumably with the correlated fewer scripts. While most dedicated fighters don’t spend a lot of time on Samurai Island itself, it’s often a person’s first exposure to C:SI, and let’s face it, Samurai Island is a lagfest. Not the best first impression possible.
And that’s just the stuff that comes to mind without even trying. Certainly there are many many more ideas to be had.
It’s interesting stuff, and it’s about time they started working toward making it available, in my opinion.
How will this affect the noobs like me who don’t know how to script? Will it be simple enough to do. Or will it be like scripting? ‘Cause, I don’t touch scripts. XD
It won’t affect non-scripters directly
What it will do, presumably, is allow those of us who *do* script to create better user interfaces for HUDs and other interactive displays, with less prims and less scripts, which will have indirect benefits to the consumers and the sim owners where such objects are used.
Well thats good to know, I had some assumptions in the directions you mentioned. I just wanted to get some clarification on my curiosities.
So this is a really dumb (smart? LOL) question but like will Mono be forced or will it be Linux style? So just like in Linux you gotta #!/bin/sh or #!/bin/perl to choose the language so will it be #!/lsl and #!/mono or something at the top of the script to say what language yer using?
Aimee Congrejo’s last blog post is : Leaving Yakuza and going clanless for a while
I believe that current plans include having a “Compile to Mono” checkbox on the script editor window, so that the script creator can select which VM to use.
Supposedly at some point in the future, LL will “recompile behind the scenes” all existing scripts so that they run on Mono. This will, of course, break 75% of existing content if they ever do that, but they have reserved the right to do so (they’ve not given any dates or said it’s a definite plan).
Very cool information. At the last Mono meeting I attended, it was discussed whether or not a Mono region would be brought to the main grid for testing purposes, but it seemed unlikely, at least for now. Integrating Mono with H4 is the next logical step toward merging all the branches, I hope it doesn’t detract too much from the Mono work itself.
Darien Caldwell’s latest blog post is : Broken Profile Picks
News of Mono is what brought me into Second Life in the first place. Back in June of 2006 I had been looking up something related to my current project, and found an article on “Micro-threading Mono”, which led me to a video about Second Life and their work with a Mono VM.
It all looked pretty interesting, and I thought it was pretty sweet that I could actually script stuff for this “new virtual world”, so I signed up to check it out.
Nearly two years later, I’m still here but Mono is just starting to be available for testing