A second life for 'Second Life' with open source?

In the aftermath of the hype over the virtual world, a tiny group of developers presses on with building its Linux presence.

Until recently, the business news media fawned over the Second Life online virtual world. Stories fixated on Second Life "residents" who got rich brokering virtual real estate, or on the numerous corporations and consumer brands rushing to claim their presence within it (by building virtual kiosk centers or "islands"). Virtual world hype trumps open source hype, so little virtual ink has gone into discussing the open source initiative that Linden Lab, the company behind the virtual world, established to further its development.

One of these projects is the Linux version of the Second Life client, the viewer application that runs on the resident's computer and lets the resident interact with the graphical environments of the virtual world. Ever since its release, the Linux client has remained in constant development by an informal team, usually three people. Their work could directly benefit the open source and Linux community beyond Second Life, in the aftermath of the hype.

Linden Lab declined a request for current figures on the number of people using the Linux client. Nonetheless, Jason Giglio, a developer and Second Life resident who actively works on the client, says he heard through the proverbial grapevine that about 5% of registered Second Life residents, or about 10,000 people, visit Second Life with the Linux client. Giglio does client code on a volunteer basis, but it is work related: He says he earns a living managing virtual land and doing contract programming gigs in Second Life.

Although the Linux population in Second Life is small, the official maintainer and lead developer of the client, who goes by the handle "Tofu Linden," likes to describe them as "amazingly involved and passionate." Tofu is an employee at Linden Lab and works on the Linux client as part of his job. The group has helped him and his volunteer developers, like Giglio, deal with vexing technical issues. Some of their work has helped not only the Linux Second Life client but also the other platform versions.

That is because the same codebase, which Linden Lab makes available under the GNU General Public License, is used for all three platforms, for example, the Microsoft Windows client. The company's FAQ page says it did so to "allow deeper industry and community collaboration, advise the development of market-driven standards, and may one day spur the development of the viewer to accelerate beyond the resources and direction of Linden Lab."

"Linden Lab always had a pretty enlightened view regarding cross-platform development," Giglio says. "It is all OpenGL, with a few compiler conditionals for the small parts of the code that must be platform-specific. I'd estimate 99% of the code is not platform-specific, however," he adds.

The Linux version of the client has been labeled as being in alpha for a long while now. Its development remains quite young compared to its Microsoft Windows and Apple Mac OS X counterparts. Tofu wants to test it more thoroughly on a wide range of distributions and configurations before officially moving it to beta or final release status.

"[Linden Lab] had problems with stability and bugs since the beginning. They are transitioning to more of a focus on stability and code quality now. Open source is one way that they can improve code quality," Giglio says.

Presently the Linux client enjoys good stability and, like the other operating system versions, includes in-world streaming video and audio, and embedded Web pages. Voice-chat support is working very roughly as of this writing, but has not been deployed, partly because of licensing issues (it depends on a proprietary library).

"I've never really worked on a C++ codebase as large and complex as Second Life before, so I don't have a lot of basis for comparison. But the codebase overall seems to reinvent a lot of wheels: It doesn't take advantage of existing libraries as much as it could, and the various subsystems are not very well abstracted from each other," says Callum Lerwick, an aspiring video game developer, who works with the Fedora project and has been developing the Second Life client for that distribution.

Wrangling graphics drivers has been the greatest technical challenge for Lerwick and his colleagues, especially on the ATI side. Because drivers from ATI and nVidia are not open source, the Linux community generally cannot do much in the way of trying to fix them or make them more compatible with applications.

"[Advanced Micro Devices], who own ATI, often speak about how they want to improve their OpenGL support and their Linux drivers in general, but it all seems to be talk. ATI drivers have remained a very sore point for any OpenGL application, such as Second Life," Giglio says.

The Linux client team has been working around such problematic driver issues primarily by collecting feedback from testers. Because the Linux demographic is a minority in Second Life, many of them have become testers providing invaluable data simply by using the Linux client.

"Our Linux-using residents are among our most hands-on, which is especially significant, given how much creation occurs in and around the Second Life platform every day," Tofu says. "Personally, the most awesome thing I've seen the Linux Second Life community consistently do is help each other running and making the most of Second Life."

Hearing from other people, like Lerwick, who have distribution-specific packaging skills is particularly needed right now. "It'd be terrific to get Second Life into the various upstream distribution channels where feasible, or at least make distro-specific installation smoother for the many distros out there. Clearly, we should have Second Life 'just work' for as many users as possible," Tofu says.

Though their dealing with the graphics drivers is limited, the Linux client team's other development efforts focus on replacing the other proprietary dependencies with open source ones: OpenAL is being ported to replace the FMOD sound-effects system, for one. The team also wants to implement open alternatives to Vivox, used for voice chatting, and SpeedTree (for rendering virtual trees and plants.

One proprietary library that's still in use is Kakadu Software's product, which supports JPEG2000. The open source alternative, OpenJPEG, is catching up, however. "It's just not as fast as Kakadu right now, and Second Life decodes a lot of JPEG2000 textures," Giglio says. "When Second Life was first open sourced, OpenJPEG was very unsuitable, but it has improved a lot due to the efforts of people working on the Second Life client. [Lerwick] did a lot of work there. Soon we will be able to drop Kakadu."

"My ultimate goal is to make the Second Life client available in the official Fedora repository. This is made difficult by the client's dependence on some closed-source libraries," Lerwick says. He took on the job of optimizing the OpenJPEG library to bring it up to a usable level of performance, and wrote a patch for the Linux client to use OpenAL for audio.

Giglio explains why it is important for them to rid the Linux client of as many proprietary elements as they can before taking it out of alpha. "Proprietary dependencies mean that the fully free client is crippled in some pretty big ways. The good thing about working to remove proprietary deps is that the work you'd do would not only benefit the Second Life client, it also benefits other projects by providing good, fully free libraries they can use, too."

He wants to further this idea by developing a patronage model around the continued development of the Second Life client. Under his proposed business plan, users would directly pay open-source developers to fix bugs or add features. These changes would then be merged back into the main codebase of the client. "A lot of the custom client work going on right now [for Second Life] are effectively forks. There is no intent to return that code to Linden Lab in a usable state," says Giglio.

He would like to see more of this work released to the public, which has not always been the case. It would certainly help speed up the work that he, Tofu and Lerwick still have to keep doing in order to properly refine the Linux client.

"According to a Linden Lab employee, development of Second Life began in 2000 by a team that hadn't done C++ before, at a time when [Standard Template Library] implementations were buggy and slow. Patches to fix problems are gladly accepted," says Lerwick. "At the end of the day, it gets the job done, has supported a vibrant diverse community for many years now, and that's what is important."

Learn more about this topic


This story, "A second life for 'Second Life' with open source?" was originally published by LinuxWorld-(US).

Join the Network World communities on Facebook and LinkedIn to comment on topics that are top of mind.

Copyright © 2007 IDG Communications, Inc.

SD-WAN buyers guide: Key questions to ask vendors (and yourself)