Jump to content

Resources for modern scripting


Stephane Zugzwang
 Share

You are about to reply to a thread that has been inactive for 544 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I scripted quite a bit a long time ago (2005 to 2007) - Chess boards, a Sudoku game, the Virtual Reality Room for those who remember it. I'd like to start gain, but are there resources somewhere taht compile the new features of LSL since then ? Notably how to handle mesh, what has replaced prim count, texturing in a mesh world, etc...?

Link to comment
Share on other sites

Welcome home, Stephane.  It's been a while and SL has changed dramatically. 

There is no single source that will bring you up to speed, I'm afraid. Creation in SL is way more complex than it was a decade and more in the past, a lot more of the creative work is done offline and imported, and more of the creators are at least semi-professionals.  In my opinion, it's harder to break into any part of the creative enterprise from a dead start than it was when we started.

You can spend time with Knowledge Base articles, but those are really little more than ground level overviews.  The same is true for most of what you will find in the wiki (https://wiki.secondlife.com/wiki/Main_Page) , which remains a gateway for information about more advanced topics in SL -- as it was back in 2007.  As a scripter, you will inevitably end up in the LSL end of the wiki. There's no good substitute for just taking off your shoes and wading into all the descriptions of functions that have been added since you last looked (and ones that have been expanded too).  The LSL Scripting Library -- now a subforum of this one -- is a good source for examples of clever solutions, and it's much better organized than it was back in the day.  And of course the other Creation forums are places to mine when you have questions about mesh, animations, animesh, and all.

When I started scripting -- roughly when you were last doing it -- there were a couple of starter-level books on the market.  Those are out of print now and I doubt that they will ever be updated.  Most of us who were starting out then learned from people like Void Singer, Dora Gustafson, Strife Onizuka, and a gang of others who tossed ideas around in this forum. Most of them are long gone, but the tradition remains. We still trade thoughts, create occasional sticky threads, and help new scripters deal with arcane LSL problems.

  • Like 3
Link to comment
Share on other sites

47 minutes ago, Stephane Zugzwang said:

Notably how to handle mesh, what has replaced prim count, texturing in a mesh world, etc

As Rolig says, no one source is going to answer all your questions, and I (a relatively newcomer to SL) assume there's a lot more "junk" info that's been outdated since you were last here.

But a crash run-through of those specifics:

  • (From a scripting perspective) Mesh are kindof like prims but with most of the shape-changing functionality removed. you can scale and position and re-texture and that's about it.
  • "Land Impact" replaces prim-count. Land Impact (LI) is a somewhat convoluted "worst of 3 factors" test. If a linkset has any mesh components, or uses certain 'new features" (advanced materials and physics shape specification come to mind) it uses the new LI calculation, otherwise it uses prim-count. you can read more about it here:
  • Texturing a mesh object is mostly the same script-wise as texturing a prim, but the number of faces and where they are are determined by how it was made in an outside-SL program. A single mesh object may only have up to 8 faces.
  • What's new to SL texturing is the introduction of "advanced materials" you can read about them here :People on very-low-end devices might not have the ability to see them turned on.
  • Like 3
Link to comment
Share on other sites

And then there are Experiences, which offer not only new ways to move avatars and objects but -- more exciting from my own perspective -- a new way to store large amounts of information in non-volatile records (Key-Value Pairs or KVP) in SL servers (well, AWS servers, really).  There are still some important limitations -- primarily that you must be a premium member or empowered by one if you want to script for an Experience and that Experiences are not grid-wide.  Still, for some applications, Experience functions are letting us tackle some scripting challenges that we could never dream of touching a decade ago.

 

  • Like 2
Link to comment
Share on other sites

I suggest you consider looking into llJsonSetValue(), llJsonGetValue() - I have replaced most of my list coding with these.

You can have lists within lists, arrays, Key-Value pairs..but you still have to uses lists for all other LL() calls that required them before.

If you've ever programmed JSON, it may make sense.

 

Link to comment
Share on other sites

I might start by just working through the list of LSL functions to see what looks unfamiliar.

I'm guessing most of your scripting was before the Mono compiler, so that dramatically changed the performance characteristics of LSL scripts.

Was this before scripts could be http servers? That's kind of a big deal for many applications. Also the "efficient script" initiative, with functions like llSetLinkPrimitiveParamsFast(). And llGetObjectDetails() was introduced in 2007 so that might be new, and has surely been extended.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 544 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...