Web 2.0 in Second Life
Second Life is a 3D virtual world entirely built and owned by its residents. Since it started in 2003, it now has over 200,000 inhabitants from all over the globe. It allows residents to buy, sell and trade their digital creations using the in-world currency called the Linden dollar.
Matt Biddulph from hackdiary, has found a way to incorporate Flickr images into your virtual homes. Touch it and it looks up your avatar name to see what your favourite Flickr tag is, and then it’ll pick a random picture with that tag and display it on its surface.
The full article awaits after the jump!
Second Life is a 3D virtual world entirely built and owned by its residents. Since it started in 2003, it now has over 200,000 inhabitants from all over the globe. It allows residents to buy, sell and trade their digital creations using the in-world currency called the Linden dollar.
Matt Biddulph from hackdiary, has found a way to incorporate Flickr images into your virtual homes. Touch it and it looks up your avatar name to see what your favourite Flickr tag is, and then it’ll pick a random picture with that tag and display it on its surface.
Instead of accessing Flickr API directly or using local storage, he made a stateful web companion for the new object with a bit of serverside Rails.
Web resources:
/seen?user=SomeAvatar: Records that the object has sensed the presence of SomeAvatar
/touched?user=SomeAvatar: In response to a ‘touch’ event, consults the database for the user’s tag and asks the Flickr API for a random photo with that tag. Returns a string such as http://flickr.com/some/photo.jpg|SomeAvatar|, or UNKNOWN.
/set_tag?user=SomeAvatar&tag=sausages: Records SomeAvatar’s favourite tag
“The HTTP system is nicely responsive: using the web as my object’s outboard brain added only a tiny bit of latency to the mix. The asynchronous model allowed other processing to continue while waiting for a response. With these URLs ready to respond, I wired up the appropriate Second Life events using llSensorRepeat and sensor for presence, llListen and listen to respond to spoken commands, and touch_start for the physical interface. The llParcelMediaCommandList features are confusing (and only work on land you own, with movie streaming enabled in the client), but I found the source code for Freeview to be a useful reference.” said Matt Biddulph or Matt Basiat in Second Life.