Monday 25 May 2009

AGS's 'Demo Quest' on Xbox360

The bulk of the conversation system is now in place, and there will be further refinements when I tackle the last major component (GUI customisation). Here's a new video detailing the following:
  • New Editor appearance (themes).
  • New Script Action creation method (popups).
  • XAGE again converting and running AGS's sample game, Demo Quest (demonstrating a short conversation between Cris and Beman).


This time we don't cover exporting the graphics from AGS, but you can see that the conversion process is mostly painless. The only changes necessary here are to place the Player character, Cris, in the same room as Beman, to whom we scale up and add an onTalkTo script to initiate the conversation. A side-by-side comparison of AGS and XAGE:

Photobucket

From the video and picture above, the following is evidently missing or incorrect:
  • GUI (Reason: Not yet implemented in XAGE).
  • The character scaling is off (Reason: Room XML required - cannot access walkable areas to automatically determine correct scaling).
  • Wall Panel missing (Reason: Room XML required - cannot access information on room objects).
  • Cris is darker in AGS (Reason: Not sure. Either there's some filtering applied by AGS that I'm not aware of, or the room's palette is affecting the sprite).
Also, the Cris character has no animation for walking up (away from the screen). AGS is happy with this and just substitutes with an appropriate left/right walking animation, whereas XAGE currently expects the animation to be there, hence the odd sliding effect in the video. This will be dealt with at some point.

So far all of the conversion work is based around what is required for Demo Quest, so it would be very interesting to hear about other people's experiences. Once XAGE v0.4 is released I'll see about placing some sort of official feature request with AGS/Chris Jones for AGS Room XML export functionality, providing there's demand for it.

Edit: Ags Forum thread here.

Friday 8 May 2009

Dull Technical Post

Real life events have again made it difficult to contribute time to XAGE, but there has been some small progress in the last few weeks.

I remember now why I put off implementing the conversation system for so long - there are a lot of design ramfications of doing so. The basic structure is in place and its now possible to initiate and select various conversation options in a similar way to a LucasArts game.

The reason it is incomplete is a long one. I've found that the more time I've spent on XAGE, the more inclined I am to want to do things right, rather than use any cheap or ugly hacks. One such case is that the dialogue system requires new Action Types in order to initiate conversations, amend option visibility etc. Rather than plumb these in as before, I wanted to completely rewrite how the Actions are organised both internally and externally.

Internally: At the moment, actions are simply stored as a type and a string of associated content, which is delimited by the tilde character. This is simple to implement but is quite brittle. After discovering Nick Gravelyn's post about serialization, I realised that it was actually possible to put Action types in their own class and still serialize them. This is a much cleaner and correct OOP way of doing things.

Externally: The original Action editor relies mostly on combo boxes. Given that the number of action types was swelling to thirty and beyond, it was becoming obvious that this list would become daunting to any unfamiliar users. It's also quite a backwards thing to select the action type before the item it is being performed on. By selecting the item first, you automatically narrow down the number of possible actions you can perform. Its also more intuitive:

(old) Walk -> (Character, ToXY, Direction, Pause)
(new) Character -> Walk -> (ToXY, Direction, Pause)

Its not especially easy to illustrate using text alone, but the benefits should become obvious after a few minutes of use. The above also means I can wrap up each piece of information into a seperate class and re-use as necessary for each Action (e.g. Pause after action is used in various). Certain items are now selected via popup buttons rather than combo boxes, as this is more visual and easier to understand.

All of these changes require quite a large rewrite. One problem is that, previously, I've completely seperated the codebase of XAGE and the Editor itself, as they only shared a dozen or so classes. As the number of classes has grown massively due to the new Action structure, it has become obvious that I need to wrap all the shared classes into a Global project, and expand any functionality in XAGE or the Editor via partial classes.

None of these required changes are particularly exciting in any way, and will take some time to complete. The end result will be a cleaner, more flexible XAGE v0.4, which should be the first wholly public alpha.