Watch: Scripting in Second Life

With C#, a Feature Once on Linden Lab’s Roadmap But Apparently Forgotten

My post on UdonSharp, the user-made C# compiler for VRChat, inspired me to reach out to Jim “Babbage” Purbrick. Because when he worked for Linden Lab, he was aiming to make it possible to script in Second Life with C#. Sad to say that didn’t come to pass, and he left the Lindens in 2010. As he wrote on his blog then:

Alas, tomorrow is my last day at Linden Lab and Babbage Linden will never get to see C# scripts running in the wild in Second Life, but I very much hope that I do. I hope that C# support is eventually added to Second Life and that I don’t have to wait 170 years to turn the handle. As another Babbage said when he failed to build the Difference Engine: “Another age must be the judge”.

Watch Jim’s demo above to see how cool that could have been, with more background on his blog.

“Supporting C# and other modern languages was always the end goal with the work on Mono and we implemented the Mono scripting engine to be language-independent,” he tells me now. “Although in production we only ran LSL scripts compiled to CIL we had development builds which would run C# compiled to CIL with normal C# compilers and then processed to inject microthreading support with the same tools that processed the assemblies produced by the Linden Script Language compiler in production.”

Bringing C# to Second Life, as he explains, would be an enormous modernizing leap for the platform:

Second Life scripting LSL C Sharp Jim Purbrick

“At the time I was working on embedding Mono in Second Life I spent a lot of time talking to another engineer called Joachim Ante who was working on embedding Mono in a game engine he was working on called Unity. Since then Unity has become one of the most widely used game engines in the world. We used Unity to build experiences in Oculus partly because it’s what a lot of engineers know and expect to use. ” (After leaving Linden Lab, Jim eventually wound up working for Facebook/Oculus.) “Supporting C# in SL would make it much easier for those developers to build experiences in Second Life without first having to learn a new language.”

There is at least one barrier to making C# available in SL:

“When I stopped working at Linden the main blocker to getting C# support in to SL was that bytecode verification of untrusted code hadn’t been implemented in Mono, so we could only run trusted C# code in our demos,” as he puts it. “That functionality may well have been implemented since then.”

Another possible barrier? Given all the turnover since 2010, I’m honestly not sure anyone at Linden Lab even remembers this project is still on their shelf — or is high enough on the corporate ladder, to prioritize it.

Hat tip to reader “seph”, who inspired me to talk with Babbage via this comment:

Babbage Linden for years (2006-2010 ish?) communicated the process of getting Second Life’s scripting powered by Mono. He talked often in user groups and other places about a clear path towards supporting not just C# but other .NET languages like F#, IronRuby, IronPython, etc. I’m not sure what happened other than Babbage leaving but obviously we never got C#. It seems now with that past work already done and Mono’s licensing not being as problematic as it once was now that its owned by Microsoft (problematic LGPL then, MIT now), and there even being another option/successor like .NET Core, Linden Lab should invest in updating its own scripting again with the inclusion of C# and more .NET features.

Have a great week from all of us at Zoha Islands and Fruit Islands