Sunday, 24 January 2010

XAGE Games as Facebook Apps

Regardless of what you may think about Zynga, the numbers reported to be playing FarmVille are astonishing. This is due, in no small part, to the viral manner in which the game is distributed via Facebook.

I spent the morning having a quick look at the Facebook API when it suddenly dawned on me - Silverlight Applications (and therefore games) are supported. A few hours later I'd been able to set up a quick test App using the latest Awakener build:

Photobucket

Note: The App itself has not been submitted to the Facebook Application Directory and it is linking to the game via a local host, but it's pleasing how simple this proof-of-concept has been.

There's a lot of potential with this. It could be used as a means of distributing a demo and raising awareness for a commercial game, or it could be used to give freeware games a larger audience (with, perhaps, a paypal donate button attached to the app). Or there could be integration with Facebook Credits e.g. reach a certain level and you need to cough up to keep playing, similar to the Xbox Indie Trial system.

Chances are I'll need a new 'Publish to Facebook' option in XAGE Editor.

Saturday, 23 January 2010

Compression & Encryption

Over the last few days I've cleared a couple of crucial items from the roadmap that I've been putting off for months.

For reasons that escape me now, XAGE Editor was using a different zipping library than the engine itself. Now everything uses the excellent SharpZipLib library, which has provided some decent space savings when it comes to publishing XAGE games to different platforms. This is how all versions compare in their distributable packages, in order of size:
  1. XAGE Awakener - Silverlight (.xap): 5.28mb
  2. AGS Awakener - Native Windows (.zip): 5.71mb
  3. XAGE Awakener - Xbox 360 (.ccgame): 6.44mb
  4. XAGE Awakener - Native Windows (.zip): 7.67mb
So as it currently stands, the Silverlight version is the smallest, and comes in at a paltry 1.8mb with the music removed. Whether these relative sizes will scale this way for larger games remains to be seen, but considering XBLIG's can be up to 200mb in size, the compression is more than satisfactory.

In addition, save game files are now also compressed, with a typical save for Awakener coming in at about 60k. Loading and saving isn't as snappy as I'd like it to be (particularly on Silverlight) as there's a lot going on in the background but it's never more than a few seconds.

In the past I've touched upon encryption. It's important to ensure all of a game's raw assets are protected from both casual inspection and more determined snooping. As the heavy-duty AES encryption wasn't supported on the Xbox & Silverlight, I've had to look elsewhere. I've now implemented a system I'm reasonably happy with, as everything is now locked away from prying eyes. This also includes save files, to prevent tampering.

Finally, Awakener now has only 49 script errors remaining. I said I'd be happy if I got it under 100. Consider me ecstatic if I get it down to under 10.

Tuesday, 19 January 2010

AeroNuts

The ninth conversion project. Abstauber from the AGS forums kindly offered to send me the source to his MAGS winner, AeroNuts. It's part SCUMM-esque point 'n click, part arcade shoot-em-up (such is the versatility of the AGS engine):

Photobucket

As expected, the shmup parts don't run at all. The adventuring sections are up and running, though they are not especially functional as AeroNuts, much like the HitchHikers remake, relies quite heavily on custom modules. I had to implement a small, temporary hack in order to get the character.GSay() statements to convert into XAGE Talk Actions.

It's been a useful exercise in that it has helped identify and fix a handful of bugs with both the AGS Plugin and XAGE Editor. As with all conversions, I'll be revisiting them periodically as XAGE matures. Most of them will become more playable when certain input-related functions are handled correctly. You can find the original version of AeroNuts here. Well worth a look.

Saturday, 9 January 2010

Odot Tamat On

A few days ago I came across the source code for an AGS game, Odot Tamat On, by Zabnat. It has an interesting cartoon art style and with a few minor tweaks I'm able to get the introductory cutscene to run in XAGE:

Photobucket

The number of scripting errors wasn't too high, at 719. It's worth noting that none of the AGS conversions play particularly well at the moment other than Awakener (itself down to 78 errors), but improvements remain iterative and noticeable over time. You can play the original, rhyme-filled AGS version of Odot Tamat On here.

Elsewhere, I've made another revision to the animation system in order to cater for AGS-style views. Each character can now switch between views in order to more easily change the walking or talking animations. The main difference is that views are character-specific rather than from a separate pool that all characters can access. I can understand the reason why they're organised like this in AGS, but as with dialogues/conversations I'm loathe to separate it all to that extent as it seems slightly unintuitive to the end-user. To simplify things I've rename 'Animation Frames' to 'Frames' and 'Custom Animations' to just 'Animations'. Now a script can run both a specific animations or an animation belonging to the current view. This means XAGE can now convert AGS code like cFadi.Loop = 0:

Photobucket

Almost all of the character animations now run perfectly in XAGE, which is a hurdle I'm relieved to have overcome. Once I've completed the following, Awakener will be pretty much done, excluding walkboxes:
  • Script Stacking.
  • Script parameters and return values.
  • Calling scripts in IF/While conditions.
  • Timers.
  • GUI manipulation.
  • Handling special AGS functions ('on_mouse_click, 'repeatedly_execute' etc).
On a related note, Awakener is one of an impressive five games by Ben nominated for the JayIsGames best freeware adventure game of 2009.

Friday, 1 January 2010

"Taste the Day"

In the final few minutes of 2009, XAGE reached an important psychological milestone - Awakener is now playable to completion. That is, you start a new game, click on a bunch of stuff and get to the end sequence and credits:

Photobucket

Admittedly, there is still a lot to do. Four or five small, manual hacks are required to get certain sections to work, as there are still 123 scripting errors (acquiring the halberd has to be completely bypassed, for instance). Some of the cutscenes work perfectly and others are decidedly clunky, plus there remain a few visual glitches and oddities.

Fixing these remaining issues is going to take at least a few more weeks, possibly months depending on how much time I get to spend with it. The end aim remains the same - to have a fully complete, playable Awakener with as few manual changes required as possible.