Thursday, 25 June 2009

XAGE Publc Alpha v0.4 - Download

I'm not sure of the exact date, but it's been more or less a year since I began working on XAGE, and it's a relief to finally have something to publicly show for it. You can now download it at the following link:

www.clarvalon.com/XAGE/Release/xage v0.4.zip (2.8mb, mirror)

This includes:
  • XAGE Editor (with embedded Default Game)
  • Skeleton Visual Studio Projects for Xbox360 and Silverlight (included for the people who have expressed an interest in trying them out).
It has to be pointed out that this release is more than a bit rushed as I'm completely swamped. There are quite a lot of known issues and unfinished sections, but as a whole product it's the most feature-complete version yet. It's fair to say that the included game is a little underwhelming compared to previous ones, due to lack of fancy Lucasarts graphics and varied scripting, but it should serve as a pointer on how to achieve the absolute basic effects.

As usual, XAGE is hungry for feedback and bug reports, both of which can be submitted in seconds via the built-in menu options. Likewise it would be interesting to hear the experiences of anyone attempting to use either of the VS projects or the AGS conversion tool.

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):

Photobucket

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.

Sunday, 7 June 2009

AGS's 'Demo Quest' on Silverlight

I'm currently rewriting how content is handled, in order to make it trivial to publish XAGE games on various platforms (more about this later). Part of this is targeting the Silverlight platform, so I've rebuilt Demo Quest (as per the xbox video) and temporarily uploaded it to play in your web browser here. It's playable but VERY sketchy, as most of the optimisations and memory issues won't be sorted until Silverlight v3.

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.

Wednesday, 22 April 2009

Editor Appearance

One of my gripes with the XAGE Editor was that the toolstrip looked bad on Vista - a sickly pale colour as opposed to XP's vibrant blue. It seems to be a recurring problem for Winforms developers.

When looking for solutions for this I came across a useful, free component framework, Krypton Toolkit, which is a lot more lightweight than the likes of DevExpress but looks good and seems to perform pretty well. I've spent the last few evenings making the Editor play nicely with it - there are a few workarounds due to various limitations, but I'm now at the stage where I'm satisfied it has been worth the effort:



I like it. It has a smooth WPF-esque feel about it whilst still being plain old Winforms. The new Editor Appearance preference allows the end user to choose between a number of presets. If I get the time I'll add a few custom ones - for novelty value alone I'm interested to see how it looks in an eye-watering pink.

Saturday, 18 April 2009

Refactor, Bugfix, Itch

The overall response to the AGS converter, despite its infancy, has been pretty positive so it's something I'll continue to work on. It's probably worth reiterating that my little engine is not an official port of AGS, or in any way affiliated or endorsed by it; they are two seperate engines that share some general goals & functionality. Also, the conversion only ever takes place at the developer's project level, not with the compiled AGS game as this would be unethical (and also really hard).

I've taken a closer look at AGS's file structure and it is in fact possible to glean quite a bit more information than I originally thought. I've started a component that picks out all the dialogue options and then parses the associated dialogue script for the associated behavious, which map quite nicely to XAGE's Actions.

This cannot be ported over just yet as there's no equivalent functionality in XAGE - as much as I'm itching to dive in and start work on the Conversation system, there's a whole bunch of bugfixing and refactoring to do first. Walkboxes are now (fingers crossed) feature complete, and the graphics control in the Editor is more user friendly with mousewheel zooming and right-click scrolling. It also better illustrates which pixel you're selecting and a few other handy things like showing WalkBox connectivity. Here's a mini-changelog:
  • FIXED: Character Panel slow due to obsolete links
  • FIXED: Anim Frames getting width & height out by one pixel
  • FIXED: Removed clumsy indexing for Anims, CustomAnimSteps & Actions
  • ADDED: New IF Actions (Variables & Objects)
  • ADDED: Graphic control - change get pixel depending on what we're getting (with new icons)
  • ADDED: Graphic control - drag image via right mouse button
  • ADDED: Graphic control - zooming controllable by mousewheel & cursor position
  • ADDED: Graphic control - zoom buttons no longer originate around 0,0
  • ADDED: Graphic control - show when walkboxes are connected
  • ADDED: Basic in-game debug window
  • ADDED: Active flag for WalkBoxes, amendable in scripting, resets WalkBoxMatrix
  • ADDED: onEnter event for Walkboxes - script to run when Player enters
  • ADDED: Basic AGS -> XAGE conversion