Projects

libsecondlife

In Spring of 2006, I started the first effort to create an open source implementation of the Second Life networking protocol by reverse engineering the client. The official website describes the goals of the project:

“The libsecondlife project is an effort directed at understanding how Second Life works from a technical perspective, and extending and integrating the metaverse with the rest of the web. This includes understanding how the official Second Life client operates and how it communicates with the Second Life simulator servers, as well as development of independent third party clients and tools.”

The library quickly grew to one of the most active open source C# projects and has been under steady development ever since. Projects I have developed using libsecondlife include, but are not limited to:

Samsung mobile Second Life client

  • Low-bandwidth proxy bringing mobile devices into Second Life


Long Range concert

  • Event sharding and replication: Staging a concert for hundreds of attendees in Second Life


SLeek

  • Visual protocol debugging: Server-side object culling


primpreview

  • Tying it all together. Prim rendering, texture downloading / decoding, and asset serialization


Second Life Viewer

In January of 2007, Linden Lab released the Second Life client under the open source GPL license. Interested developers were invited to contribute source code and patches, of which I’ve made a few.

  • [VWR-1475] OpenJPEG always uploads single layer lossless images - Second Life uses JPEG2000 to compress texture data, which offers efficient storage and streaming downloads of image data. Unfortunately, the fastest available JPEG2000 library (Kakadu) is a closed source commercial product that cannot be shipped as source code with the GPL client. Thus Second Life supports both Kakadu and OpenJPEG, an open source implementation of JPEG2000. A bug in the initial implementation of OpenJPEG was uploading lossless images that did not support streaming downloads. As it turned out, this bug provided useful functionality for sculpted prims, so lossless uploads were turned off by default but backported to Kakadu and released as an official patch.
  • [VWR-2617] Adds LLSD support to flex/light/sculpt params for primitives - Linden Lab Structured Data (LLSD) has become a foundation of the Second Life protocol. As it turns out, LLSD is a great base to build an object serialization format on, and after spending some time looking into this I realized that support for prim serialization was already in the official viewer! However the code appeared to be aging, and hadn’t been updated to take into account new primitive properties. VWR-2617 brought the LLSD support for prims up to date and was accepted into the main viewer.
  • [VWR-4165] Export prims to LLSD - Building on VWR-2617, which provided prim LLSD support in the client, VWR-4165 adds a pie-menu option when clicking Second Life objects. This new option allows object exporting to the hard drive as a serialized LLSD file. While I have yet to perfect import capability in the Second Life viewer, libsecondlife utilities offer the possibility. Given appropriate time allocation this functionality could be integrated easily.
  • [VWR-184] Visual Studio 2005 Solution and Project Files - When the Second Life viewer was first released under an open source license, Microsoft Visual Studio 2003 and gcc3 constituted the only working build targets. VWR-184 added the first set of community build files to the issue tracker, which were later replaced by the very elegant CMake build system.

A comprehensive list of my filed issues can be found here.

Miscellaneous Second Life Projects

Sculpt Preview

  • A simple program to preview sculpt maps as sculpted prims before uploading to Second Life.

LindeX Trader

  • LindeX Trader. Interfaced with the secondlife.com website through screen scraping and browser emulation techniques to provide an almost real-time interface for trading the Linden dollar. The main interface shows a market view as well as percent filled bars for outstanding buy and sell orders.

    Perhaps the most interesting facet of LindeX Trader was the delivery method—you purchased an object in-world that contained a private key and a software identifier. The object would phone home to a central server with your avatar UUID, a private key, and the software identifier, and providing two means of authorization. An entry for the purchasing avatar was added to the database or a registration key was returned. I wrote a C# registration module that would check either a registration number or avatar identity against the central database to authorize the software each time it ran. The main failure point was uptime. The registration database and Second Life had to be online for the program to function. Never-the-less, the system was an interesting experiment in selling non-virtual goods in Second Life.

    Since LindeX Trader relies on screen scraping methods and the Second Life website has changed several times since the original release, the program is no longer active. I plan to release LindeX Trader as an open source project so that interested parties can benefit from and expand the project.

GPS Fleet Tracking

Fleet Tracking Site

The Motorola i415 cellphone was one of the first low cost phones to include a GPS device accessible from the public SDK. This meant anyone could write a simple Java application that installed on the phone and retrieved GPS data. Around the same time, the Mologogo service sprung up, offering a social network, big brother mash-up that let you track your friends. While it never managed to surpass MySpace, Mologogo did provide a fun use for a $40 phone with a $5/month pay-as-you-go data plan.

While working at Hurliman Heating, eager to add “next-generation Web 2.0″ features to my latest site design, I tried my hand at a low-cost fleet tracking solution. I wrote a simple Java program that would fetch the current GPS position every 30 seconds and upload it to the hurlimanheating.com website along with a unique identifier for the phone. I threw the data into a MySQL database and wrote a front-end using Google Maps that could show current vehicle locations or daily historical paths for individual vehicles.

Had the project launched, a phone would be hard-wired into each vehicle and setup to always run the tracking program. The project was completed but never went into production use (hence why it is still publicly accessible). On the fleet tracking site, you can see the last recorded position of the test vehicle about half a mile from the shop.

Visual Regression

Visual Regression

While studying econometrics, I made an application to visualize univariate linear regressions. The statistical functions were ported to C# from the Cephes library, and the ZedGraph chart control was used to visualize the data. I added a text file parser that could handle a variety of different delimited text files (the kind you might feed into Minitab or export from Excel). The ordinary least squares regression is calculated along with some basic statistics including a residuals histogram and significance levels.

Second Life Economics

Second Life parcel prices

In April 2007, I wrote an economic paper on land pricing in Second Life. The idea was to determine a list of possible variables that would increase or decrease virtual land value, and collect data on those variables to find correlations. I wrote a libsecondlife bot to periodically collect data from the land sales listing in Second Life, and when a potential sale or de-listing was detected the bot would teleport to the plot in question and collect detailed information. The paper was my final undergraduate work, and due to time constraints only 291 samples were collected. However, even with the limited sample size I showed that listings that included a picture, and waterfront property were both selling at a premium.

MythTV

MythMusic

In 2003-2004, I spent a considerable amount of time trying to build the perfect Home Theater PC running Linux and MythTV. My focus was better remote control support and a smoother setup process, as well as better support for third party applications. I wrote the EXECTV patch that allowed tvtime integration, and laid out the technical spec for the MythMusic redesign along with miscellaneous remote control and setup fixes.

Espra

Espra client

In 2000-2001, I worked for ESP Worldwide on a peer-to-peer client, which was built on top of Freenet. Venture capital dried up before the project made it out of beta and everyone moved on to new things, but thanks to 72 hours without sleep in San Francisco and 24-hour Kinkos, we successfully unveiled a tech demo at the 2001 O’Reilly Peer-To-Peer Conference.