Sunday 14 June 2009

'Avatars may leave innocents or bystanders slightly injured, but not dead'

Precautionary swine flu quarantine aside, the weekend has provided some much needed relief. Easily the biggest thorn in XAGE's development has been dealing with all portability issues. I was pleased with the heavy-duty Rjindael encryption but unfortunately it was not compatible with either Silverlight or the Xbox. After scouring the web I was able to find three different, working ports of SharpZipLib, meaning I could begin work on the ...

Unified File Access:

All assets are now zipped up for published games, reducing the size and number of files. With regards to file formats, it's not even a case of working with the lowest common denominator, as there is no way of freely (i.e. without licensing issues, either by using mp3 or commercial libraries) using any two formats on all three target platforms. After a lot of trial and error and about half a dozen open source audio components, I've finally implemented a solution that satisfies all the requirements for the new integrated publishing system:
  • XAGE can now play one piece of background music at a time, and any number of sound effects.
  • Music is initially stored as Mp3s and sounds as Wav files. These are used when debugging on Windows (via SdlDotNet).
  • For published windows games, the user is given the option of swapping the Mp3s for Ogg tracks to bypass any licensing issues. The Wav files are untouched.
  • For Xbox games, the Wav files are automatically converted to Xnb via MSBUILD. The Mp3s are converted into Wma.
  • As Silverlight cannot natively play Wav files, they are coverted into Wma and Mp3s are left untouched, covered by Silverlight/MS.
  • All three platforms are capable of loading assets from the pre-prepared zip files (with the exception of the Xbox Music as it cannot stream a compressed Wma file).
Just thinking about it is exhausting, but it all works as expected. Publishing an XAGE game is designed to be as simple as possible (K.I.S.S applies to UIs too), so the user will be oblivious to most of the above. The Xbox and Silverlight platforms are a little more involved, and require a free installation Visual Studio 2008, but even then it's mostly just a case of hitting the big green 'Start debugging' button.

What does this all mean? Well, after debugging a game via XAGE Editor it's possible to play the same game on the 360 and a Web Browser in a matter of seconds (minutes if you've made changes to the graphics or audio):


Xbox Live Indie Games:

Community Games has been rebranded by Microsoft to 'Indie Games', which seems like a sensible move. This coincides with the release of the Xna 3.1 framework, which from XAGE's point of view doesn't yet provide a compelling reason to update. The inclusion of Avatar support is a nice touch, though there are some strange guidelines regarding their use in games.

As DBP09 closes in August, I've taken the decision to wrap up any loose ends, release v0.4 and then see if I'm able to complete my game within the competition deadline. I'd essentially be submitting a demo (not that there is any chance of me winning anything), but it will be a good exercise in finally putting the engine through its paces and will give ideas on areas of improvement. The resulting 4 month Creator's Club access will be handy too, giving me time to take a proper stab at it before releasing to XBLIG.


Jim said...

Wow, you're going above and beyond ironing out these cross-platform hurdles, but I'm sure it'll be worth it for those who want to release to xbox & the web simultaneously. Which, I'd think most would in some form. As a gamer, going to a site and playing a live demo would be incredible.

The avatar terms of use kills me. No violence, as in, don't do anything like Halo or GoW because we want do this first with a large studio and profit handsomely. It's their sandbox and they can do as they please, but it'd be interesting to see what indie developers come up with without the rules. --Jim

Clarvalon said...

Quite a few of the xna developers are still sharing their sales data, which makes extremely interesting reading. There's a game on XBLCG called Solar which has done pretty well, partly because the developer decided to release a flash demo of Solar to Newgrounds, which attracted a fair amount of attention and resulted in some pretty decent sales figures.

I'm not aware of any Silverlight portals that attract nearly as much traffic as Newgrounds, but adoption is rising and anything based on the .NET framework generally seems to do very well due to the wealth of developers able to work with it.

As for Avatars, a third-person Avatar shooter would do really well. I'd play it. It's surprising that there haven't been many XBLA titles utilise them. In about 3-4 months time there will be a flurry of Avatar-based Indie games which will almost certainly result in a bit more exposure. The usage restrictions seem to place some odd limitations on how the user interacts with their avatar, which may impede efforts to creating any story-based game. Having said that, it's not beyond the realms of possibility that one day XAGE could have some use for them.