The Second Life Client-Viewer: A Case Study in Using Open Source

Leszek Krawczyk, School of Computing and Mathematics, [HREF1] , University of Western Sydney, Locked Bag 1797, Penrith South DC, NSW 1797. l.krawczyk@uws..edu.au

Steve Hansen, Associate Professor, School of Computing and Mathematics, [HREF1] , University of Western Sydney, Locked Bag 1797, Penrith South DC, NSW 1797. s.hansen@uws..edu.au

Yogesh Deshpande, Senior Lecturer, School of Computing and Mathematics, [HREF1] , University of Western Sydney, Locked Bag 1797, Penrith South DC, NSW 1797. y.deshpande@uws..edu.au

Abstract

Second Life as an extension of web technology into the Virtual World arena, has had an enormous growth over the last year. Resulting from user demand, at the start of 2007, its creator Linden Lab has released the client software as open source software. It has now over 7,000 files and makes use of libraries or scripts from a number of areas such as Microsoft Platform SDK Microsoft Direct X SDK, Apple QuickTime SDK, Cygwin and ActivePython. These are needed for various internet and file operations, graphics, video and audio, mathematics algorithms and related tasks. This paper examines the current Second Life open-source client, itemises its components, identifies various compilation problems, and gives practical solutions to producing working builds. The overall work points to two main conclusions. The first is, unsurprisingly, that knowledge of the client software is essential to develop Second Life interfaces and to integrate it into the "first life" web environment. The other one is that, although open-source and thus collaborative, the project still has many problems of "missing" files, incomplete documentation, compiling orders and version control. These poblems exist in other large open-source software as well, pointing to the necessity of building robust infrastructures to facilitate better coordination and faster progress in open-source projects./p>

Introduction

Something new and exciting is happening on the online world, 'Second Life', an interactive online three dimensional world, has become a "First" life for many people (see Second Life usage statistics, Second_Life, 2007b). Users can demonstrate their creativity by designing and uploading artwork, 2D or 3D; streaming live music and making in-world money which can be exchanged to real American dollars (Second_Life, 2007a). Real world companies such as IBM have seen the advantages of this technology and jumped in to virtual e-world by creating their own islands and providing online help-desk for their users (Grant & Carthage, 2007)

The porthole to this 3D world is the Second Life viewer. The viewer is not only the control interface for the 3D world it is also a programming and 3D modeling interface.

The Second Life viewer is an internet client, downloaded from the Second Life website and works independently from the user's web browser . (There are some cut-down versions of the viewer that allow the web browser to access Second Life, such as Moveable life (MoveableLife, 2007) and Sleek (Delta, n.d.) that provide non-graphical and selected functions such as chat, search and teleport.) The client gives a 3D graphical interface and allows the user to move their "avatar", i.e. one's persona in a virtual world, around the 3D world. Linden Lab, the creators of Second Life, has introduced a tutorial session on sign up, to guide the user through all the interactive basics such as communication, movement, map reading, search features and interaction with the environment.

Through the viewer, the avatar is fully customizable. Its physical appearance can be altered to give a wide range of characteristics including gender, height, build, facial and body type features, and complexion. Also imported textures can be applied to an object for a photo realistic reproduction, other textures can be imported like a brick texture, that can be applied to a basic building to make it look more realistic.

Three dimensional models can be built and brought into Second Life. With the addition of scripts, they can be programmed to serve specific functions like movement, resulting in more naturalistic manners for avatar actions such as the way it walks, sits. Streaming of audio and video files in world is provided by Apple Quicktime. There is also an 'in world' currency called Lindens which can be used in exchange for goods and services.

These functions enable Second Life to provide applications in marketing, promotion, e-Business (Wikipedia, 2007) education, medical and social engineering all of which are found in one form or another in the current version.

There are a number of Universities and other smaller teaching institutions (EduservCETIS, n.d.) who have also put their mark on to the Virtual world. These institutions have virtual classes taught in a virtual classroom. One of the world's largest public health systems, the United Kingdom's National Health Service (NHS) is utilising Second Life as a review platform (Meskó, 2007).

Linden Lab operates and manages the servers supporting Second Life and gains income from a form of tax on users who have acquired land. Apart from this tax (and a premium membership for those wishing to have land), Second Life is free to use and free for users to set up their own economy. Resulting from many requests from users (Jaime & Mauricio, 2005), including those representing the special needs community, Linden Laboratories released the Second Life viewer as open source software (Johndan, 2002) in January 2007. From the Second Life website http://secondlifegrid.net/programs/open_source various resources have been made available to encourage a development community.

This paper comes from an on-going research project in the development of Second Life interfaces and applications. In the investigation of the usage of the open source viewer it was decided to join the second life community, go through the process a new developer would have to go through in the client compilation, this being the first stage needed for the development of new features and interfaces. This exercise also provided an insight into the nature of open source software and its versioning, management and development. An overview of open source software is presented in section 2.

The viewer provides an interface with considerable capabilities for new applications. However as will be discussed in the paper, the current version, as an open sourced early release, has still many and severe problems for developers. Some of the problems are due to the open source nature; some from the compilation process (SL Developers, 2007), some from the limited documentation; and others from the constantly changing technology itself. There are many components of these problems: parts of libraries; missing items; version inconsistencies (if not actual errors); plus the sheer complexity of the OS code itself (more than 7000 files). The interaction of the software environment and the operating system is lacking in documentation and has inconsistencies resulting in many problems in compiling and in the OS development. Section 3 gives an overview of the viewers operation and an analysis of the viewer architecture. Section 4 presents the compilation process and associated problems with an analysis in section 5. This is followed by a synopsis and summary in the conclusion section.

2. WHAT IS OPEN SOURCE SOFTWARE ?

Linden Lab has released the viewer software as "Open Source". This can be taken to mean a number of things in the software world. A typical classification of what is meant by the terms "open source", "shared source" and the like is given by Johndan (Johndan, 2002) as shown in Table 1.

Table 1 - Key Open (and Related) Categories and Definitions
Term KeyAspectsMajor Names
Free Softwareusers can copy and redistribute
users can access source code
users can modify and redistribute code
Richard Stallman
Open SourceEric Raymond, Bruce Perens
GPLFree Software Variation: Copyleft (hacking copyright law)Richard Stallman
Open Standardsinterface specs (protocols and frameworks) publicly available for useIBM, Netscape, Microsoft
Shared Sourceusers allowed to see source code on as allowed by ownersMicrosoft

The licensing statement from Linden Lab is as follows:-

The Second Life Viewer is available under multiple licenses. Your rights to modify and redistribute the source code written and provided by Linden Lab is governed under the license of your choice:

The GNU General Public License, version 2.0, with a FLOSS exception - those people wanting the freedom to modify and redistribute the Second Life Viewer as open source/free software may do so under the GNU GPL, with a special exception to allow for use with open source licenses that might otherwise be incompatible with the GPL. Note that the GNU GPL is a reciprocal license, meaning that if you use portions of the Second Life Viewer to create a new derivative work, that work must also be licensed under the GPL.

Commercial licensing - For those wishing to incorporate the Second Life viewer into a proprietary product offering, Linden Lab also offers the Second Life Viewer source code under commercial terms which allow for this. Please contact us at licensing@lindenlab.com for further details.

"Second Life" and "Linden Lab" are registered trademarks of Linden Research, Inc. Other trademarks include (but are not limited to): the names Linden and Linden Research, as well as the Linden Lab Hexagon Design and the Second Life Hand Design logos.

Use of logos and trademarks are subject to the Linden Lab trademark policy.

Note that some components necessary for use with the Second Life viewer are licensed from third parties under different licenses. The license for those components is clearly marked inside the distribution of those components. Some components may require payment of royalties or have other restrictions associated with copying, modification or redistribution. Please consult the license for all components when licensing the software.

In order to accept contributions of source code, we ask that you follow the guidelines for submitting code, which include the submission of a contribution agreement.

The licensing statement is thus a warning to the user that to make Second Life work a mixture of open source and proprietary software may be necessary. As can be seen from the second last paragraph "Note that some components necessary for use with the Second Life viewer are licensed from third parties under different licenses…. Some components may require payment of royalties or have other restrictions associated with copying, modification or redistribution.", "the open source" release may have restrictions and there is no guarantee that this does indeed satisfy the requirements of open source as defined by the Open Source Initiative (OSI). The OSI's first stipulation states:

The license shall not restrict any party from selling or giving away the software as a component of an aggregate software distribution containing programs from several different sources. The license shall not require a royalty or other fee for such sale. (OpenSourceInitiative, 2007)

Notwithstanding, the current version was eventually compiled, using Visual Studio 2005 under the academic licence, without payment of royalties; however further work is needed to completely identify possible restrictions on some of the third party components.

3. FUNCTIONALITY AND ARCHITECTURE OF THE SECOND LIFE VIEWER

Through the open source viewer the user can construct a fully customisable Avatar. The physical appearance can be altered to give a wide range of characteristics including gender, height, build, facial and body type features, complexion and wearable skins. As mentioned at the start, the viewer also allows the user to import from external sources such things as textures for clothes and buildings. Both 2D and 3D objects can be built or brought into Second Life. Using the viewer, scripts can be programmed to serve specific functions for example an aeroplane that flies or a car that can be driven. Motion can be added to any object to change its behaviour. All in-world features can be modified via scripts, i.e. open a door, rotate an object, complete automated transactions in the in world store, give the objects different abilities such as sitting on or wear the object (Tapley, 2007; Weber, Rufer-Bach, & Platel, 2007). The Second life viewer also has integrated streaming of audio and video files that is provided by the addition of the Quicktime libraries.

The Second Life viewer supports various 2D and 3D applications and is capable of importing external applications like Wing 3D, Maya, Blender, Art of Illusion, Plopp, POV-Ray and Moment of Inspiration (Weber et al., 2007). The viewer also supports a range of communication methods including two types of chats, a local chat which can be heard up to 20 meters away and a global chat IM (Instant Messaging) this is an Avatar to Avatar private communication with no range limit. The current viewer also supports Verbal communication where Avatars can communicate with each other using audio.

In order to cover this range of functionality, the Second life viewer is made up of twenty three sub projects, consisting of 350 folders, totaling 188 MB of source code, not including the other libraries and software that are necessary to successfully compile the viewer. When all the libraries and data files are added the count is around 365 folders, occupying 202 MB of disk space.

Each project/module performs a specific function as shown in Table 2. This table was created from information gathered from the Second Life Viewer Software Overview (Second_Life, 2007d) and from an analysis of the actual Second Life viewer source code.

Table 2 - Second life viewer software module overview
ModuleDescription
llaudioAudio abstraction (FMOD, OpenAL, Ogg)
llcharacterllcharacter Animation
llcommonCommon classes
llimageImage library
llimagej2cojJPEG2000 encode/decode using OpenJPEG
llinventoryInventory data management
llmathMath library
llmediaContains code for turning quicktime and other media sources (e.g. Mozilla) into images
llmessageMessage handling library
llprimitivePrimitive to volume tessellation and management
Primitive (object) property management
(in-world gravity , wind, light and other nature related functions)
llrenderContains code to abstract low level rendering
lluiUser interface library
llvfs Virtual and local files system management
llwindowContains code for hardware specific abstractions
llxmlXML parser / exporter
lscript_compileLinden script compiler
lscript_compile_fbLinden script function, command and variables defined
lscript_executeLinden script execution engine
lscript_libraryLinden script library
newviewThe Second Life viewer
testConnection testing
win_crash_loggerCrash logger
win_updaterCrash log sender

This analysis showed that the given documentation was not in step with the actual, there being a number of modules missing from the documentation.The differences in the given documentation to the actual project/modules is shown in Figure 1, showing the missing modules.

Figure 1 - Code overview diagram comparing given documentation grouped on top and the missing modules underneath.

4. COMPILATION

According to the available online information on the Second Life Portal (Second_Life, 2007c) site, once the software environment is set up, the rest of the software development environment can be downloaded and setup. For this to be done there are a number of files that need to be downloaded and combined. They are the source files, the libraries and the artwork files. Only after these files have been downloaded, extracted, and placed in the development folder, the process of compiling the project may begin.

The development environment setup is fairly straight forward. However it requires the software to be installed in a specific order so all the tolls register themselves with each other. This environment and its dependencies was analysed as shown in Figure 2 and in Table 3.

Figure 2 - . Interaction of development environment and the Operating System.

Table 3 - The environment components and their general functions
Microsoft Platform SDKprovides access to libraries that are necessary for the application to use the internet and for other system access such as file system and user interfacing.
Microsoft Direct X SDK libraries provide access to libraries that are necessary libraries and function to render and draw the interface in real time.
Apple QuickTime SDK libraries provide in-world audio and streaming video they also provide the mathematical libraries that are used for in world 3D navigation.
Cygwin and ActivePython are needed during the compilation process for creating scripts file for copying and file management.

The following was found to be satisfactory installation order (after some experimentation). Firstly set up the Visual Studio development environment, next install Microsoft Platform SDK, then install DirectX 9.0 SDK released on or after Summer of 2003 DirectX 9.0 SDK (December 2006), DirectX 9.0 SDK Update (Summer 2003). If there are older version installed on your system you will need to remove them as they may cause problems. Next install Apple Quicktime SDK choosing the default install option. Next Cygwin: when you run the cygwin setup utility make sure you also include patchutils, flex, and bison (all located under "devel" by default). These are not part on the default 'install'. The Second Life viewer project files use several hardcoded references that expect Cygwin to be installed at C:\cygwin. And finally install ActivePython 2.5.1.1 with default options.

When all the applications have been installed, the Microsoft Visual Studio environment has to be setup, the paths for the include and libraries for Platform SDK paths, DirectX SDK paths, Visual C++ paths, also the Quicktime libraries have to be copied tin to the Second Life project folder for best results. On the system you also have to add the system variables add paths for cygwin to the path variable otherwise when software environment does not know where the files are located.

In accordance with the online documentation the compilation process should be fairly straight forward, opening MS Visual studio loading the indra_complete.sln project in the (project folder)\linden\indra\indra_complete, then changing the solution configuration to "ReleaseNoOpt" and then just clicking on the compile button.

This is where the supporting documentation starts to fail, when attempts to compile the viewer were made, problems started to emerge, during the initial compilation the resulting compiles refused to comply as there were files that were missing. From an investigation it was found that libraries like QuickTime were necessary, especially the math libraries which were being used in navigation and location, also after a fair bit of digging of the online documentation and tracing files, it became clear that this version of the download was missing files which could be found in a previous version.

The online documentation was missing the necessary support libraries that were needed to compile the viewer, most of the instruction that were provided were not clear and following them had mixed results with some of the libraries compiling and some failing, The main problem with the libraries was they had different licences and could not be shipped with the downloads according to the documentation, continuing on the documentation path, agreements were made for the distributions of the compiled libraries removing these compilation steps and making the libraries available as downloads.

Attempts were made to communicate with the community for discussion of the compilation process. The returning answers referred to those stuck in an earlier part of the compile process. When more complete errors where sent, there were no replies from the community. The community have found out in trying to compile the application, that there are more and more problems that arise and the documentation that is available on the wiki being limited . Following the failure of a global compile and build, the individual projects were compiled, testing each in turn, Figure 3 shows the compilation sequence

Figure 3 - Individual project compilation module by module.

Finally, with each compile run taking about an hour, a final compile was accomplished and on logging in, the newly compiled viewer takes the user to a "special" for-those-who-have-compiled area, as shown in Figure 4.

Figure 3 - Individual project compilation module by module.

5. ANALYSIS OF THE OPEN SOURCE COMPILATION PROCESS

A summary of the problems associated with the compilation of this open source project is given below.

  1. Given documentation not in step with the version release (ie lacking version control);
  2. The documentation is not clear or easy for "outsiders" to use;
  3. The dependencies of the modules on particular libraries in third party packages, for example, the Quicktime libraries are necessary for proper compilation of the application, regardless of what some of the documentation says, as they are necessary for the mathematic libraries, apart from any video needs. These dependencies are sensitive to version releases in the associated third party products which can lead to breakages of the dependencies if the latest releases are used (ie dependency on particular releases, not the necessarily the latest);
  4. Problems in building the libraries from the given documentation. This has now been partially addressed with compiled libraries being supplied. However this does not give the full flexibility of open sourcing;
  5. There are potential licensing issues with various third party products needed in the compilation for a true open source or GNU environment (GNU, 2007);
  6. Missing files from the released versions, that is, the version release is not self sufficient, some files from previous releases have not been included;
  7. Order of compilation is important as dependencies are built up. The documentation again is lacking .
  8. From the analysis of the development environment, Linden Lab have drawn on a variety of sources for the various viewer functions. Some of these, such as the reliance of the Quicktime mathematics libraries (in addition to the video aspect) indicate the nature of their development team and their expertise. In moving the closed-source software into open source, these dependencies become both noticeable and possible sources of problems. The problems of documentation comes down mainly to providing version control and dependency awareness. Researchers such as Hissam. Plakosk and Weinstock (Hissam, Plakosh, & Weinstock, 2002) have shown that the open source environment leads not to simpler projects but to a more responsive fault-fixing one. Others such as (Lawton, 2002) have shown that creativity and growth are also associated with open source. In particular, in their study, they found that the rate of growth in the development of open source 20 times that of comparable closed source or commercial development.

    Even though the release of the Second Life viewer is still relatively recent, this growth development is seen in associated developer communities such as Libsecondlife (Libsecondlife, 2007) which, with the blessings of Linden Lab, have set up a re-engineering open source community to develop the technical interaction of the viewer to the virtual world. This open developer community (only version 0.3) has produced its own set of libraries and builds for compilation and have started on a community analysis of the viewer. At this stage, of the more than 200 classes associated with the viewer, about 20 have been documented . This is also in line with the extraction of metrics for determining activity in open development as Scott and Greg (Scott & Greg, 2007) have indicated by data mining open source projects at SourceForge.net (claimed to be one of the worlds largest open source sites).

    6. SUMMARY AND CONCLUSION

    The conclusion of this report is that the interactive online three dimensional world is an exciting and emerging field. The second life application has great potential especially now that it has been open sourced and has opened up new avenues for all levels of development. Currently there are some drawbacks due to the immaturity of the open sourcing, the scale of the project and the dependencies on various third party products.

    To resolve these problems, we recommend comprehensive versioning controls in the form of basic centralised documentation and the introduction of a CMS (Code Management System), instead of the all in-one-documents that are currently being used.

    In addition the relationship of the developer communities such as Libsecondlife and the Linden Labs needs to be strengthened along with true guarantees of non-dependencies of licensing of any third party products.

    Finally, the issues of integration of the viewer into the general web environment, movement of web legacy into virtual worlds and issues of accessibility are fertile grounds for further research work.

    References

    Delta. (n.d.). Sleek. Retrieved 26th Janaury, 208, 2008, from [HREF2]

    EduservCETIS. (n.d.). Joint Eduserv/JISC CETIS Second Life in Education Meeting. Retrieved September 30, 2007, from [HREF3]

    GNU. (2007). GNU General Public License. Retrieved 6/1/07, 2007, from [HREF4]

    Grant, J., & Carthage, J. (2007). Second Life / Sametime Integeration,. Retrieved 5/1/2007, 2007, from [HREF5]

    Hissam, S. A., Plakosh, D., & Weinstock, C. (2002). Trust and vulnerability in open source software. Software, IEE Proceedings -, 149(1), 47-51.

    Jaime, S., & Mauricio, S. (2005). 3D sound interactive environments for problem solving. Proceedings of the 7th international ACM SIGACCESS conference on Computers and accessibility.

    Johndan, J.-E. (2002). Open source basics: definitions, models, and questions. Proceedings of the 20th annual international conference on Computer documentation.

    Lawton, G. (2002). Open source security: opportunity or oxymoron? Computer, 35(3), 18-21.

    Libsecondlife. (2007). Libsecondlife. Retrieved 26th January 2008, 2008, from [HREF6]

    Meskó, B. (2007). Medicine in Second Life: virtual doctors, hospitals, and of course, sperm donation from [HREF7]

    MoveableLife. (2007). What is MovableLife? Retrieved 26th January, 2008, from [HREF8]

    OpenSourceInitiative. (2007). Open Source Initiative. Retrieved 4/1/2007, 2007, from [HREF9]

    Scott, C., & Greg, M. (2007). Analysis of Activity in the Open Source Software Development Community. Proceedings of the HICSS 2007, 40th Annual Hawaii International Conference on System Sciences, (CD-ROM), Jan 3-6, 2007, Computer Society Press.

    Second_Life. (2007a). Currency Exchange Retrieved 5/1/2007, 2007, from [HREF10]

    Second_Life. (2007b). Economic Statistics: Graphs Retrieved 5/1/2007, 2007, from [HREF11]

    Second_Life. (2007c). Open Source Portal. Retrieved 6/1/07, 2007, from [HREF12]

    Second_Life. (2007d). Viewer Software Overview. Retrieved 6/1/07, 2007, from [HREF13]

    SL Developers. (2007). Common compilation problems. from [HREF14]

    Tapley, R. (2007). Designing Your Second Life New Riders Press

    Weber, A., Rufer-Bach, K., & Platel, R. (2007). Creating Your World: The Official Guide to Advanced Content Creation for Second Life, Sybex.

    Wikipedia. (2007). Businesses and organizations in Second Life. from School of Computing and Mathematics, University of Western Sydney

    HREF2
    http://delta.slinked.net/second-life/sleek/
    HREF3
    http://wiki.cetis.ac.uk/EduservCETIS_20Sep2007
    HREF4
    http://www.gnu.org/licenses/gpl-3.0.html
    HREF5
    http://www.ibm.com/developerworks/blogs/page/roivw?tag=Lotus
    HREF6
    http://www.libsecondlife.org/wiki/Main_Page
    HREF7
    http://scienceroll.com/2007/04/16/
    HREF8
    http://movablelife.net/login.aspx
    HREF9
    http://opensource.org/about
    HREF10
    http://secondlife.com/whatis/currency.php
    HREF11
    http://secondlife.com/whatis/economy-graphs.php
    HREF12
    https://wiki.secondlife.com/wiki/Open_Source_Portal
    HREF13
    https://wiki.secondlife.com/wiki/Viewer_Software_Overview
    HREF14
    https://wiki.secondlife.com/wiki/Common_compilation_problems
    HREF15
    http://en.wikipedia.org/wiki/Businesses_and_organizations_in_Second_Life
    HREF16

    Copyright

    Leszek Krawczyk, Steve Hansen and Yogesh Deshpande, © 2008. The authors assign to Southern Cross University and other educational and non-profit institutions a non-exclusive licence to use this document for personal use and in courses of instruction provided that the article is used in full and this copyright statement is reproduced. The authors also grant a non-exclusive licence to Southern Cross University to publish this document in full on the World Wide Web and on CD-ROM and in printed form with the conference papers and for the document to be published on mirrors on the World Wide Web.