Second Life: Script-triggered Sounds and Viewer Audio Channels

Second Life allows objects to be scripted to trigger the playback of sounds. These can include anything including (but not limited to) birdsong, gunshots, clicks and sound bites.

The viewer- or at least those intended to present the full audio-visual experience (there are text-only applications for accessing Second Life)- has an audio preferences panel, giving the user control over the sound levels of various channels:

  • Music
  • Media
  • Voice
  • Sounds
  • Ambient
  • UI

There’s also the “Master” volume slider, but that’s not a channel per se.

Currently, all script-triggered audio gets piped through the “Sounds” channel- this allows you to mute in-world audio if you’re on a voice conference, mute the UI if you’re filming Machinima, or mute the in-world gusts of wind via the Ambient channel (though I’m not sure what else uses Ambient).

An idea that occurred to me that seemed to gain some interest in AW Groupies (hence the blog post here fleshing out the idea a little more) was whether or not script-triggered audio could/should have the ability to be declared as belonging to a specific audio channel, i.e. set sounds like birdsong, the roar of a waterfall or the trickle of a stream to the Ambient channel, so the sound level could be reduced or muted entirely, leaving the user more able to hear sounds like footsteps, doorbells, or anything else that’s intended to provide audio feedback to the user (such as the earlier gunshots example). CodeWarrior actually suggested that some script-triggered sounds might be more suitably applied to the UI channel rather than the current global “Sounds” channel.

This is obviously a feature that would require some server-side assistance to work as intended, though I am curious to know if it’s possible to have a viewer “intelligently” distribute sounds across the various channels, e.g. if a particular asset gets constantly looped, it should be shoved into the “Ambient” channel. Although not really suitable for long-term use (it would probably break a few intended behaviours in current content), it would certainly give a tangible demonstration of what effect any extra functions should have on the overall user experience. Then of course, there is the issue that any server-side solution would have to be done in such a way that was backwards compatible with non-supporting clients (e.g. not preventing script-triggered sounds from glooming into the global “Sounds” channel).

Fixing a pet peeve with the display of many Twitter avatars on a single page

So I sent Suzen Juel a tweet about Spotify, suggesting that if not for distributing her own music, she could use it to let her fans know what music she likes.

Twitter being twitter and having the open API that it does, SpotiChart had a tweetbot that detected the presence of a link to Spotify playlist, inviting me to make use of their service (and thankfully, their coders seem to have implemented a mechanism to save their resources and the sanity of Twitter users by only sending the automated tweet directed at each user once). So I took a look around their site, specifically the “Most Tweeted Playlists” chart. Given that it was the first time I’d viewed the page, even on my fast (~8mbps) ADSL connection there was a noticeable delay as the images loaded- lots of irritating “broken image” place-holders being displayed by Firefox. Even after all the avatars had finished loading, one or two avatars had just 500′d, resulting in the display of the alt text.

This experience agitated my web geek sensibilities, and it sparked a possible solution in my head, which I successfully tested.

The Problem

The problem lies in browser’s default behaviour when handling uncached images, as well as ones that have failed for whatever reason. If an alt attribute is specified on the image tag, the text gets displayed in place of where the image should be. This isn’t always desirable, since alt text can mess up the layout of a web page.

Example of Twitter avatar display

No special CSS close-up

With no special CSS applied- only some basic floating, you can see that things don’t look so pretty. It looks worse in browsers such as Internet Explorer, which display a broken image icon alongside the alt text.

Adding constraints

constraints close-up

When no dimensions are specified, elements are allowed to expand to accommodate the alt text, or in the case of an image containing no alt text, the elements usually shrink down to a point where they may as well not be on the page. By adding height and width, a problem is avoided where the page expands vertically (and occasionally horizontally) as the content loads. On newer computers this is problem is merely an annoyance, but on older or underpowered devices, this could be quite irritating as it causes unnecessary reflows and repaints.

We’re still left with the alt text being displayed, as well as potentially having holes appearing in a large grid of avatars when images fail to load.

Solution Attempt One

clipping close-up

The initial solution that popped into my head after visiting spotichart.com worked, but it introduced a problem: images that load will get replaced by the fallback image along with images that don’t!

Solution Attempt Two

jQuery solution close-up

So we need a solution that allows us to only apply the fallback image in cases where it’s needed. Well the server serving an HTML document can’t reliably detect when an image will fail, so the detection has to occur on the client. This is where JavaScript comes to the rescue, or in this case: jQuery.

Since JavaScript provides an “error” event, jQuery can be used to append a value to the class attribute of an image that has failed to load. When JavaScript is disabled or not available, the CSS provides a graceful fall back.

Summary

  • Not providing image dimensions can interfere with your layout, and can cause a source of annoyance as the page is rendered.
  • jQuery can help indicate which images failed to load.
  • CSS allows for graceful degradation.

The code for this solution- which can apply to other situations like image galleries, or anywhere that large numbers of small images are displayed together in a list or grid- is available under the public domain with all the example CSS & HTML removed to make the source code easier to read through.

Observation: Police and Fuel Prices

So it seems that fuel prices have reached the point where the local constabulary are being sent out on public transport instead of doing rounds in a patrol car.

WebComic RSS

I had a poke around my public services (the stuff on services.signpostmarv.name), cleaned up a bunch of crap that was no-longer in use, then decided to poke around the code for my WebComic RSS service. There’s a mix of UHU4 and UHU5 code in there, so I thought it was time to start upgrading the code to UHU6.

I’m making heavy use of the namespaces & late static binding features in UHU6, so it’s easier for me to keep things organised (yay namespaces!), as well as trimming down on the code used in methods for inherited classes (yay late static binding!). This, combined with my weaning myself off Smarty templating in favour of Object API methods seems to have made the turnaround time for generating the feed much shorter.

At the time of writing, I’ve only upgraded the feeds for , , and . Additionally, the simplified code for WebComic RSS in UHU6 eliminated a long-standing bug with the Punch an’ Pie feed which caused the strip urls to be borked.

Object API methods

A quick word on what I’m referring to here- basically, I’m using methods with hinted types for the arguments to restrict the input at runtime so I know that the objects going in will be of a specified interface. For instance, the API for my project makes heavy use of the vCalendar format. Rather than creating a never-ending list of parsing rules for the various classes I’ll be creating as I work more on UHU6, I’ve just written a single parsing rule for a calendar class. The calendar class implements the but can only contain objects which implement the “event” interface. Coding to interfaces instead of particular implementations of an interface keeps the code much, much leaner.

Quick SL Achievements web client demo

Since I’ve made some progress on the project, I decided to create this video demonstrating the web client for the SL Achievements API that I’m working on.

There is a working HUD at the moment, but that version of the HUD doesn’t talk with the server so completing an achievement doesn’t get recorded.

For the API, I’ve used a vCard/vCalendar-based syntax that should be easily parsed by LSL, though some API calls will have extra-condensed outputs available. With the “list all achievements” call for instance, there’s a vCard-based output that’s fairly human-readable, and the extra-condensed output designed to be used by the LSL HUD.

I Took The Tateru Comic Challenge

Some say that creativity is a product of our freedoms.

I’m more of the opinion that creativity is a product of our constraints, whether externally imposed or self-imposed.

So, the self-imposed challenge: Take five images (already taken) from the digital camera’s memory-card and weave them into a one-page comic that tells a story.

Tateru Nino

When your world ends, what will you do ? Will you suffer to deal with your loss ? Or will you supress it, trying to forget the pain ? Or try to move on, look to the future even though it may appear empty ?

Metaverse ID 0.14.2 released!

While tinkering away this morning with an upgrade to my WordPress plugin MV-ID, I thought I’d sneak in a new feature: shortcode support!

What this means is that in addition to sidebar widgets, you can now embed the profiles inside blog posts like so: [mv-id mv='agni SL' id='83b3987f-9520-4275-8efe-3ac13dd3f635'].

The plugin supports displaying individual profiles as shown above, but also supports displaying multiple profiles in one go: [mv-id mv="WoW EU"].

Additionally, by including the "h" parameter in the shortcode, the name of the metaverse the profiles are from is displayed: [mv-id mv="CO" h=3].

Remember- because MV-ID is hosted on the WordPress Plugin Directory, you can install MV-ID right from the comfort of your blog, no FTP or SVN geekery required!

How Mainstream Media views Second Life

dilbert-1991-02-12

Generally after an article is published with this view of Second Life (it being a dull hole in the ground with nothing to do), pretty much every savvy Resident points out how wrong they are.

Original strip

Dilbert characters are by Scott Adams and ©2009, United Feature Syndicate, Inc. Mashup created under the Collaborative Content License of The Official Dilbert Website terms, from where the above images originated.

Studio Ghibli Films as MMOGs

The last couple days I’ve been thinking about how various Studio Ghibli films could be adapted to MMOGs, which would work, which wouldn’t etc.

Lupin III: The Castle of Cagliostro

If Lupin III were adapted as an MMOG, I don’t imagine it would be more than a generic Crime MMOG with the Lupin III label slapped on the side. However, given the large amount of source material for Lupin III, I think if the rights were given to a decent studio, it’d be more suited to an episodic single-player game series (with optional small-scale multi-player)- the kind of thing suited to distribution on Steam.

Nausicaä of the Valley of the Wind

Now we’re starting to get somewhere. The world of Nausicaä is a post-apocalyptic world, with warring nations vying for control of resources. There’s also the flora and fauna that have developed- giving great possibilities for PVE and PVP content.

The film demonstrated the presence of ground & flight mounts, as well as game professions analogous to herbalism, engineering & scavenging. Siege warfare could possibly be squeezed in too.

Laputa: Castle in the Sky

One word: Steampunk.

A Laputa MMOG would fit nicely into the Steampunk genre, since aside from the “lost technology”, the world seems to be nicely in the era of the Industrial Revolution. If the lore is tweaked in only the tiniest way- e.g. the events of the film didn’t take place, leaving Laputa intact (or perhaps keep Laputa destroyed but acknowledge the existence of other flying castles around the world). Given the size of Laputa and other castles like it, they’d make great end-game content.

Imagine working up your level & resources to the point where you could get a flying vehicle capable of making it through the outer storm (whether it be a small dirigible for your party or a large airship for your guild). Landing on a castle would be one thing, but you’ve got to take into account the other people trying to find their way there, as well as their plans for the castle. Plunder or attempt to take control ?

Ideally, a Laputa MMOG would be structured such that the game could be thoroughly enjoyed without ever having to go searching for a flying castle. Rather than a guild trying to take over Laputa or another flying castle as their player-run settlement, what about player-run settlements on the ground ?

Grave of the Fireflies

Not suitable for MMOG adaptation whatsoever. Grave of the Fireflies is a great work of animation, but I have very little desire to watch it again due to how emotionally disturbing the film is.

My Neighbor Totoro

I don’t particularly consider this film to be suitable for adaptation, though at a push it could be developed as a casual title aimed purely at the tween crowd.

Kiki’s Delivery Service

Kiki is a troublesome property to adapt. As discussed on twitter, there’d be some trouble reconciling the lore of one witch per town- though I’m not sure if that was just Kiki’s personal preference as opposed to a rule set in stone (I’ll have to re-watch the film ^_^). Given that the core of the film is a coming-of-age story about a young witch going off to train for a year, a Kiki MMOG would likely be aimed at tween girls.

Personally I feel that a Kiki MMOG would be best suited with each town being a personal instance for each player- though it would be nice if they could invite friends in to hang out (said friends wouldn’t be able to do any game-advancing quests, though social activities would be available). If towns were instanced for individual players, it might be interesting to have a shared overworld area- afterall, Kiki did meet another witch in the early part of the film, so it’s a possibility.

Only Yesterday

This is another film not suited for MMOG development- the film is about an individual journey, and the film is very grounded in the “real world”.

Porco Rosso

Whether Porco Rosso could be adapted to an MMOG is debatable. I suppose it could work as a small-scale MMOG; There’s certainly PVP & PVE content available within the story (sea-plane pilots for hire), but I think this would just be a generic flight-sim MMOG with the Porco Rosso label stuck on the side.

Pom Poko

Like My Neighbor Totoro, Pom Poko would be suitable for the tween crowd, given the craziness of “transforming raccoons”, though the western release would probably try to erase all references to “pouches“. I don’t imagine there’s much room for PVP in a Pom Poko MMOG, though as the film demonstrated, there’s definitely room for PVE- gathering food & resources to assist in the “plan”, playing tricks on the human developers & construction workers, even the possibility of annual events where large numbers of players take part in really big pranks like the parade, or grand illusions requiring the co-ordination of large numbers of players to maintain.

Whisper of the Heart / The Cat Returns

Pyrii recommended the stories of the Baron from these two films as candidacy for MMOG adaptation- I believe there are certainly possibilities to explore, though I’m not entirely clear on possible gameplay mechanics.

Princess Mononoke

The world of Princess Mononoke has strong possibilities for Asian Fantasy MMOG adaptation; There’s plenty examples of PVE and PVP content in the film. Player races would likely be limited to humans, though there’d be the choice between working against the Gods and working with them. However, as demonstrated by the character of Lady Eboshi, not everything is black & white- it should be possible to have your “alignment” change, based on decisions you make.

Certain areas of a Mononoke MMOG’s PVE content would be less focussed on the humans vs Gods/spirits and more on the various factions found in the world. Inter-faction quests/combat could be mixed in nicely with PVP if player-run settlements/business were thrown into the mix.

My Neighbors the Yamadas

I believe this film would be impossible to adapt to a game at all, never mind an MMOG. If follows the lives of the Yamada family- not really MMOG material.

Spirited Away

Now here’s a definite candidate for a fantasy MMOG. A fantasy world of spirits hidden alongside the human world. As discussed on twitter, there’s the possibility of either working for Yubaba, or being an independent. Race-wise, the film demonstrated the possibility for humans coming into the fantasy world, and being forced to work for Yubaba (an interesting gameplay element there would be the player character names being forcibly changed by the server (Yubaba).

The name-changing mechanic opens up quest lines to enable the player to get their original name back. Given the scope of the film, this mechanic doesn’t seem to serve much purpose unless you drastically expand the scope of the world beyond the bath house & surrounding restaurants. I suppose the purpose of the name-changing mechanic would be to keep the bath-house area as low-mid level gameplay, with them being unable to leave until they get their name back.

Once independent, players could of course return to the bath house to spend their hard-earned game gold to relax in the baths- the various bath salts giving different types of buffs.

Of course, it would be nice if players weren’t forced to leave the bath house, and were given the opportunity to remain and rise through the ranks, or try out all the different types of jobs. Mini-games along the lines of Puzzle Pirates & Free Realms could come in handy here.

Howl’s Moving Castle

This is a bit of a difficult matter. Certainly the world of Howl’s Moving Castle is ripe for fantasy MMOG gameplay, but I think you’d have to work very hard to make this more than just a generic fantasy MMOG with the Howl label slapped on the side.

There’s certainly strong PVP possibilities (warring nations employing magic as well as non-empowered soldiers), though there appears to be little possibility for PVE present, unless you drop in some entirely NPC factions.

Conclusions

I’ve not given thought to Studio Ghibli’s two most recent films- Tales From Earthsea and Ponyo on the Cliff by the Sea- this is because I haven’t seen them (though I own a copy of Earthsea, I’ve made a promise to watch it with someone).

I would have to say that the three Studio Ghibli films most suited to MMOG adaptation (in no particular order) are Laputa, Monoke and Spirited Away. If any of these were released, I think I’m more likely to go for the Laputa- mostly because I’d like a change from the general fantasy-fare churned out by the MMOG industry in recent years. As I mentioned, a Laputa MMOG is likely to fit more into the Steampunk genre, and I’m eagerly awaiting access to the Gatheryn beta (I’m hoping it’ll be different than the let-down that was Neo Steam).

Dogbert: Linden Lab CTO

Dogbert: Linden Lab CTO

Original strip

Dilbert characters are by Scott Adams and ©2009, United Feature Syndicate, Inc. Mashup created under the Collaborative Content License of The Official Dilbert Website terms, from where the above images originated.

Bad Behavior has blocked 222 access attempts in the last 7 days.