Monday, 21 December 2009

Awakener on a Mac

As I'm not nearly rich enough to own an Apple Mac myself, I've not yet been able to test XAGE at all on that platform. This morning I was sent some screenshots of the latest Awakener Silverlight build running on an Intel-based Mac:

awakener mac xage

I was worried that there'd be some unforeseen complications so I'm pleased that it works (incidentally, Ben has released his latest AGS game, which has an agreeably silly ending).

I've almost finished a series of structural improvements mentioned earlier. Previous versions of XAGE had different action types depending on whether you wanted to set a variable (say, PLAYER's X position) to a specific value (100) or to another variable's value (Enemy's X position). This worked but was inflexible.

Now these action types have been combined into a single action, where the variable itself can be set to a value or variable via a checkbox:

Photobucket

Photobucket

As variables are now all loosely typed, we are also able to do more things complex things, like use a variables for a line of dialogue rather than explicit text. That way we can make a character shout out his X Position, for instance.

Photobucket

Likewise, the IF Value/Variable actions have been combined, and can now have multiple conditions. Additionally there's a new WHILE loop structure and new standard variable, Transparency, that is mostly redundant but helps us sidestep the ColourAlpha issues detailed in a previous post.

All these improvements mean that, Awakener's introduction and menu now work more or less as expected, with zero manual changes. Conversely, the improvements utterly break the existing scripts for The Fourth Wall, so at some point I'll have to make some sort of update process.

Tuesday, 15 December 2009

New XAGE Website

At long last there's a proper home for all things XAGE. I looked at a handful of ASP.NET based Content Management Systems (DotNetNuke, Umbraco) but they seemed like overkill for what I actually needed. A few days ago I came across the WebFoundations CMS which ticked all three boxes - nice, simple and .net based.


I'd like to say that the site a prime example of functional design, but that's just a roundabout way of saying that it is currently devoid of content. I'll be tweaking the layout and adding bits and pieces on the road to beta release.

As I quite like using blogspot for updates, the website consumes this rss feed for use on the main page (and after a little jiggery pokery, this now includes comments). That way nothing has to be migrated across and I can continue to use blogspot.

Any glaring mistakes, bugs or omissions, let me know.

Wednesday, 9 December 2009

Abortive XBLIG Ideas

Every developer has ideas that are discarded on the basis that they are unfeasible, under-developed or rubbish. Here are some of my ideas for the Xbox Live Indie Games channel, now yours, for free!:

1) "Things I'd do for 80 MS points"

With the addition of video support in the Xna 3.0 framework, it is now trivial to include clips in your game, or in this case, showboating application. Think of it as Jackass-Lite - film a series of short videos, each beginning with someone saying "For 80 MS Points, I'd ..." before they do something silly, embarrassing or mildly painful. Have two videos available in the trial version and a further ten or so unlock when the 'game' is purchased. The whole thing would be entirely transparent and shameless, and would be a financial cash-cow. Probably.

2) Remake "Star Warrior"

Photobucket

A sinclair spectrum game I remember fondly, that was ostensibly a Galaxians rip-off with an unusual twist. The gameplay was split into three sections, the first being the standard Space Invaders fare and the second a slightly unusual section where you had to avoid multi-coloured asteroids while descending onto a planet. The third part was the most interesting, a tense standoff between our hero (a magenta figure eight pixels big who would furiously dance on the spot) and the Psychotic Cyborg (a small white ball with a menacing black pixel, which I took to be an eye). The hero would have to enter a yellow maze to get to a blue diamond, protected by the cyborg who would semi-randomly twitch and jerk its way around the maze. As a six year old, I remember that making a dash for the diamond was a truly exhilarating affair, as the Cyborg would make a terrifying 8-bit screechy sound as it moved, and would mercilessly hunt and shoot your frantic, dancing hero on sight.

Modern gaming, replete with autosaves and checkpoints, can be quite lacking in tension and atmosphere. Remake the above, along with some intricate form of permadeath, and you have a genuinely stressful game with an intensely rewarding payoff.

3) "The Race Card"

Pick a card game, any card game. Play as normal until one player pulls out the Race Card. Upon playing the Race Card, their opponent must turn off their console, feeling slightly ashamed and confused.

4) Indie Band

Approach one of the many unsigned bands flouting their wares on Myspace and the ilk. Create a short application that displays photos, images, band-motifs and lyrics along to their music. Release their album or EP for 400 points and split the profits. It's limited in that the music is non-transferable and only playable on the Xbox itself, but you may get some media coverage for the unorthodox route to market (the band being interested in publicity, you in sales). I'd much rather this flood the market than massage apps.

5) Be the bad guys

Some games have attempted to let you play as the bad guy (e.g. Dungeon Keeper, KotOR) but usually in a way that doesn't have an especially meaningful impact on the gameplay. You still play the game as normal, be it shooter, RPG or Strategy, except you have evil ends to evil aims instead of good.

One departure from this would be to make a game where you truly get to be an typical Bond-Villain. It could be a bit like a tower defense game except not as dull, where you command dozens of inept, incompetent henchmen against an impossibly overpowered and good-looking AI controlled hero character (perhaps modeled on the Commando unit from the C&C games). Only through sheer attrition or blind luck are you able to take him down - perhaps he gets stuck on a bit of geometry and starts to swear. Or perhaps it's fairly easy to take him down, except the AI can restore the game from previous save points and you succeed by frustrating him to the point of exasperation, at which point he exits the game abruptly and you are returned to the dashboard, triumphant.

6) NXE 2

Make a game based on the Xbox (New Xbox Experience) dashboard itself. You essentially have a series of mini-games that are 'launched' as separate apps within the service, parodying existing games. The soundtrack could be "I made a game with 'I MAED A GAM3 W1TH Z0MB1ES!!!1' in it, innit?".

7) Motherhood

Point and Click Adventuring offers an opportunity to explore interesting and exciting areas with characters and storylines. Unfortunately the majority of titles, especially freeware games, instead prefer to explore safer and more traditional territory (You play Jacob Mackenzie, a Private Investigator with a murky past and a point to prove!). This may lend itself to traditional inventory-based puzzle-solving, but often doesn't do much in the way of providing actual entertainment.

As with film and music, I like to encounter things that I haven't experienced before. There are so many interesting topics to be covered, which first got me thinking about having a game where you play as a pregnant woman, where you navigate all the social pitfalls of dealing with a pregnancy that only you want. The player character would noticeable change over time, growing in size and a decreasing walk speed. How many times have you seen a woman giving birth on tv compared to in a game? How many games deal with the relationship and bond between a mother and her newborn child? Maybe the mechanics of such a game would turn out to be tedious, but I'd like to see it tried. It's not all about saving the world and blowing things up.

--

It should hopefully be easy to spot which of the above are rather tongue-in-cheek. Don't be fooled; very occasionally I do actually have some half-decent ideas. I'm just keeping those closer to my chest.

Edit: Star Warrior - that's the one. Added screenshot. Thanks, David.

Friday, 20 November 2009

Silverlight Progress

Whilst the Windows PC and Xbox builds remain XAGE's priority, the Silverlight version is the route to greater platform compatibility. Bill Reiss has continued his sterling work on the SilverSprite library with a new release supporting Xna's RenderTargets. This inclusion allows us to utilise scaling of games within a web browser.

As part of SilverSprite there are now two rendering methods - the old Silverlight Canvas style and the new Bitmap-based rendering. They both have their pros and cons, so I've hacked in a quick toggle to change renderer mid-game. This is how Awakener looks playing in Google Chrome at x2 scale using both styles:

AwakenerScaling

Canvas Rendering:
  • Pros:
  1. Quicker - runs at 100% on my atom netbook.
  • Cons:
  1. Ugly aliasing, makes text harder to read.
  2. Visual glitches (transparency especially).
  3. Outstanding memory leak when using bitmap fonts(?).
Bitmap Rendering:
  • Pros:
  1. No aliasing or visual glitches, looks practically identical to xbox and native pc.
  • Cons:
  1. Much more processor-intensive - choppy performance on my netbook but runs at 100% on a fairly low-spec dual core pc.
Bitmap rendering adds (at the moment) a higher hardware requirement than I'd like, but it's really helping push XAGE's cross-platform viability. Again, it's likely that there are further optimisations to be made in both SilverSprite and XAGE, and perhaps the recently announced Silverlight v4 will offer further performance improvements.

Edit: There exists a third option that hadn't occurred to me - using bitmap rendering for the backbuffer and canvas rendering for the rendertarget. This provides a happy medium - a few visual glitches but looks better than pure canvas and runs faster than pure bitmap. This translates to three Silverlight visual quality options - Low (canvas), Medium (canvas/bitmap) and High (bitmap).

Thursday, 12 November 2009

AGS Conversions: Manual amendment example

The process of identifying what needs fixing or improving in the Awakener conversion is mostly done by comparing the original AGS version alongside the XAGE version. Usually a problem corresponds with an unhandled scripting error, of which there are currently 163.

For example, the Awakener intro screen fades some textual images in and out before presenting the player with the menu. This doesn't currently work in XAGE. Examining the scripts reveals that AGS relies on a While Loop to fade the objects in and out.

So at first glance it looks like a simple case of implementing the While Do Loop structure into XAGE (essentially a specialised IF). However, the While condition also uses a local variable "trans". Local script variables are not currently supported in XAGE, so that has to be added too. Plus the While structure is to be based on IFs, which itself need to be updated to be able to handle multiple conditions (i.e. if flag== true && count > 5). Which also reminds me that I should probably merge the IF_OO and IF_OV Action Types for greater flexibility going forward.

All of which is a lot of work, just to make a few objects fade in and out. Sometimes working on the conversion feels like running down a rabbit hole of missing functionality and outstanding features, but the effort will eventually be worth it.

The above is also a good example of where manual amendments are required. AGS uses a Transparency property, where 0 is opaque and 100 is fully transparent. XAGE uses the Alpha channel, similar to drawing applications, where 0 is fully transparent and 255 is opaque.

For a line of AGS code where the transparency is set explicitly, e.g. cFadi.Transparency = 0, it is trivial for the converter to map this properly in XAGE as setting cFadi's Alpha Channel to 255. However, when the Transparency is set using a variable, as in the above example, XAGE has no simple number to convert. It's safe to say that the converter will neve be sophisticated enough to identify all possible values for the variable that stage and amend their values accordingly (which itself could introduce other bugs). The best it can do is alert the user that the value has been amended by a variable and needs to be checked that it's within the correct paramaters.

This complication leads me to believe it would be useful to have a mechanism for identifying certain scripts that are not to be updated if the conversion is run again. That means a user could manually fix various scripts in XAGE and not have them reset should the conversion be run a second or nth time (certainly useful for development and perhaps useful to anyone else who is developing their AGS game concurrently). More work. This is why it's unlikely there'll be any interesting updates for a while.

Thursday, 5 November 2009

A Short History

It's coming up to 18 months since I started work on XAGE. During that time the focus of development has shifted so much, it seems like a good time to recap how XAGE began, where it currently is and where it is going.

The Past:

The original project started as an effort to get my own adventure game on the Xbox Live Indie Games channel (then 'Community Games'). After a few months work the engine was in a playable state and, using Monkey Island 2 placeholder artwork, I was able to hardcode a small demo room. It was obvious that I needed to develop a tool to enable me to quickly create all the game content from scratch, whilst the engine itself essentially operated as an interpreter (similar to SCUMM).

Soon after the original Editor had been created, it struck me that other people may be interested in the tools I was creating. Posting in a handful of forums prompted a positive response, and I started to receive emails with comments, suggestions and general feedback - all of which has been incredibly useful and a good source of motivation. And thus, the Xna Adventure Game Engine was born.

From that point on, focus shifted from the engine to the editor itself. Numerous revisions and improvements have meant that the editor is fairly straightforward and easy to use. I took a look at the competition - AGS, Wintermute and later Visionaire2D, all of which have their strengths and weaknesses. I found myself most drawn to AGS, of which I already had a passing familiarity, as it had a lot of similarities and it seemed to have the most active and friendliest community.

As development progressed I began to think more long term about possible game projects. As I'm a slow and clumsy pixel artist, I felt that it may be a better use of my time to instead think about converting existing games to XAGE for release to the Xbox. I contacted the author of a short AGS game tentatively asking what he thought of the idea, and again the response was favourable. I have since spoken to two others, and been contacted by about a dozen or so more developers, some indie, some commercial. It is pleasing that through only a few forum posts, blogs and youtube videos XAGE has caught the attention of the handful of people I had hoped it might. I have a good idea of who I'd be interested in working with in the future and there are no end of interesting games to port.

Along the way I discovered the open source Silversprite project, and in an afternoon had XAGE up and running in a web browser. This has added a complication insofar that all new functionality has to be supported across all three target platforms - Windows PC, Xbox and Silverlight. On the other hand, it broadens the scope of compatibility to otherwise C# unfriendly platforms such as Linux and Macs.

Eager to put the maturing Editor through it's paces, I spent four or five weeks making my own short game, The Fourth Wall, for Microsoft's DreamBuildPlay competition. It was a useful exercise, leading to a lot of bugfixes, as well as proving (to me and the four or five people who played it) the viability of the engine.

The next shift in development focus came when I discovered that it was possible to automate a large part of the work when converting an AGS game to XAGE, drastically reducing the work required for the end user. Numerous improvements later and I am now tweaking and altering a few outstanding aspects of XAGE's design in order to aid the AGS conversions. This has only been possible by using the few Open Source AGS games available, and more recently Awakener.

The Present:

I'm working on getting Awakener to convert as accurately and simply as possible. I'm having to plumb in new functionality to support this, such as local script variables, script paramaters, GUI customisation etc. This is a lot of work, but the end result will be worth it, vastly improving the feasibility of running complete AGS games on the Xbox.

The Future:

The roadmap on this blog is periodically juggled and amended. Once the work on Awakener is complete, I'll look at other AGS games to help finalise the XAGE GUI design. ETA for this is 8-12 weeks depending on how much time I get to spend.

Following that there will be three main milestones:
  • Rework The Fourth Wall to work with the latest version & release to XBLIG.
  • Release XAGE v0.5 (or whichever version is current) as Beta on a swanky new, dedicated website (i.e. begin the PR).
  • Identify & negotiate rights to the first AGS game to be released on the Xbox360.
So ... there you have it. I'd like to thank everyone who has shown an interest in XAGE so far - your support and encouragement has always been appreciated. To that end, XAGE will always remain completely free for non-commercial use.

Thursday, 22 October 2009

Animation Redesign

The way animations are handled in XAGE has been redesigned to provide more flexibility and aid with AGS conversions.

XAGE previously allowed standards to be created in a fairly quick and easy manner but also lacked some flexibility. The order of the animation frames was important, as they needed to be tagged with various preset labels, "BodyWalkDown_Start" etc. There was also a duality with there being two animation mechanisms - the inbuilt tagging and custom animations (already much like AGS sprite loops). The preset tags have now been removed and now all standard animations (walking, talking etc.) are handled by user-built custom anims. This provides a little more flexibility and efficiency at the expense of time, as it takes a few seconds to set up the standard animations manually and link them to a character.

XAGE still doesn't implement Views in the way AGS does. I can definitely now see the benefit of them, as it enables the user to easily change the character's outward appearance, though there are a few (in my opinion) archaic design decisions that are slightly unintuitive, such as having the standing still frame as the first frame of a walking animation. Likewise I like having the animations frames tied to the character, even if this is inefficient. It seems cleaner and more intuitive, in the same way each conversation in XAGE is tied to a character as opposed to one big Dialogue pool.

The Editor has had a few overdue improvements too, including the ability to preview custom animations without having to run the game (a particularly large timesink when developing The Fourth Wall):

Photobucket

I'll be happy if I can get Awakener's scripting errors post-conversion down to less than 100.