Monday, 12 September 2016

Still Alive

Whatever tiny web presence XAGE has is usually followed by a comment including the word 'discontinued' or 'abandoned'.  Lack of any new releases and updates on this blog hasn't helped that perception.  In reality development has continued at a fairly steady pace (416 commits since I switched version control to Bitbucket in February 2014).  I've been posting the occasional progress tweet but recent work justifies (and my daughter's now almost sane sleeping habits allow) a new blog post.

Graphics Rewrite

A hangover from the earliest XAGE prototype had become increasingly a problem and the effort required to solve it meant it had been put off not just for months but years.  Originally, XAGE required that SpriteSheets be built by hand.  The earliest engine runtimes contained hardcoded animation frames (X/Y pos, Offset etc) for borrowed Monkey Island 2 graphics.  Later these animation frames were editable via XAGE Editor but were time consuming and fiddly to set up.  The situation was eased when converting AGS games, where SpriteSheets were built automatically at the point of conversion, but there were still problems with the whole process:

  • The placement of the assets on each SpriteSheet was not optimal which resulted in larger Png & .Xnb files.
  • Each object was directly tied to a single specific SpriteSheet, so anything that did not fit onto the specified maximum texture size (e.g. 1024 x 1024) would not be available to that object (you can see the visual glitches this would result in on old TGP videos).  SpriteSheets could be shared between objects but each object would need to have its own set of frames, animations and views etc.
  • Creating a game from scratch would still require manually building a SpriteSheet.

The solution was to move towards an approach much closed to how AGS handles art assets:

  • XAGE Editor will automatically create SpriteSheets on build (rather than during conversion) from the raw image assets.  The bundling of these images can still be dictated by the end user by arranging them in different folders or providing overrides.
  • Objects are no longer tied to a specific pre-built SpriteSheet, but now can use any image or globally shared animation and view.  This should make it much easier to eliminate any outstanding animation glitches found in converted AGS games.
  • SpriteSheets are automatically created under the hood using SpriteSheetPacker which arranges the images in a more optimal way, saving space.  Performance is improved by using FastBitmap and by only rebuilding whatever SpriteSheet has had a raw image asset change (or recreate everything when the per-platform setting has changed i.e. from maximum texture of 1024 x 1024 to 2048 x 2048).
  • Some components that were split out into seperate elements in the XAGE Editor Treeview have now been simplified by using DataGrids, to make it quicker and easier to create animations and views.
  • Managing raw assets now uses Cyotek's ImageBox component, which is far more polished than the clunky old custom viewer.

The take away is that everything is far simpler for the end user.  The rewrite is about 80% complete but the results are already positive.

This also represents a slight change in direction for XAGE.  Previously I'd been reluctant to model both the editor and engine on AGS too closely, which resulted in forcing some square pegs into round holes.  Going forward I'll be reworking any sensible AGS paradigm directly into XAGE as an individual component, rather than forcing them into a component that doesn't quite fit its needs (e.g. AGS Regions and HotSpots into XAGE WalkBoxes and Room Objects).  Anything I'm still not fond of (e.g. Bitmap masks for walkable areas) will not make their way in, but overall the ease and quality of AGS conversions should improve.

The above means ripping out a lot of old code written five or six years ago and replacing it with something a bit more elegant and appropriate.  This should put the entire engine as a whole on better footing for a maintenance perspective.

Other bits & pieces:

  • The 'X' in XAGE no longer stands for XNA but instead 'Cross-Platform'.  This felt like an important distinction as XNA is essentially dead whereas the libraries that XAGE is built upon, MonoGame and FNA, are very much alive.  More importantly, keeping the same acronym meant I didn't have to put any effort into rebranding.
  • A simple static website serves as its new home:  http://clarvalon.bitbucket.org/
  • Bitbucket also hosts a public-facing Issues/Enhancements list and Documentation Wiki.  The latter will be fleshed out once the next alpha release becomes available and focus moves away from plumbing towards implementing more of the scripting hooks within the engine itself.

Sunday, 5 October 2014

Awakener ... again

Several years ago I ported Ben Chandler's Awakener to XAGE.  Although it was fully playable, during development I was increasingly unhappy with what was under the hood.  I've blogged infrequently about the improvements that have been made to the engine since, but here's a concise comparison:
  1. Scripting is now handled in pure C# rather than an XML-based scripting language.  Protobuild is used to synchronise XAGE Editor with automatically created Visual Studio solutions.
  2. On Windows, the dependencies on Microsoft .NET and XNA have been removed by using mono & Ethan Lee's Monogame fork, FNA, along with cygwin & mkbundle to produce a standalone executable.
  3. Pathfinding is much improved with the old walkboxes replaced with floor polygons.
  4. There are now three interchangeable input methods - mouse, controller & touch.
  5. The new SDL2-based backend allows for fully resizable windows and different scaling modes. 
The Awakener UI has also been tweaked to incorporate some lessons learnt with Ortis.  Try for yourself:
I've also uploaded a short youtube video to showcase some of the above features:  http://youtu.be/enFbfhqluJU (ProTip:  Don't record videos at 1AM with a poor quality headset).

Monday, 17 December 2012

Like a Traction Engine

Ortis is currently being developed in two different continents using two different engines.  How does that work?  Like this:

Photobucket

It's a simplification of course - Ben has input on how the different user interfaces should work, and I chip in with some AGS code and the occasional ill-conceived plot device ("What if Madelyn actually suffers from hair loss and can only stimulate her follicles using the milk of human kindness?").

As the lead creative force, it's absolutely fair to say that Ortis is primarily Ben's baby.  One advantage of the approach we're taking is that, in the unfortunate event I'm incapacitated by one of the UK's many bad drivers, he'll be free to continue and complete the game to his own satisfaction within AGS.  Assuming my good fortune continues (thirty years free from being run over and killed), we'll end up with an attractive, interesting and accessible game available on three core platforms, with potentially up to six more should interest be sufficient.

Tuesday, 27 November 2012

Games 'n that

Ortis:

As mentioned on Ben Chandler's blog, we've been collaborating on a new game for some months.  It's being developed primarily in AGS, with a view to releasing an XAGE version of the game on as many platforms as we can.  It's early days yet, but the quality of Ben's initial artwork is very high indeed, and improving with each scene:

Photobucket

Rather than porting it at the end of the development cycle and being overwhelmed with hundreds of bugs, the game is being ported iteratively.  This means I can squash most issues as and when they occur, and being able to play early builds on the Xbox and Windows Phone has been important in making sure the interface is simple and intuitive across all platforms.

It's a massively exciting project to be a part of.  I'll try to blog about this more as things ramp up.

Prime Minister's Questions:

About eighteen months ago, I agreed to attempt a port of Mark Richards' then beta AGS game, Prime Minister's Questions.  It proved to be a good test case for the early C# scripting engine, though a chronic lack of free time and some unfortunate technical issues with third party libraries meant it was only about 90% complete.  Mark released the AGS version shortly after and got some decent coverage within the  mainstream press.

After recently taking another look at latest (and most likely, last) version of Silverlight, I found I was able to finally complete the job.  I'm quite pleased with the results - whilst there are still improvements to be made, general performance is much better than the original port of Awakener back in 2010:

Photobucket

Mark's now working on a new HTML5 & Javascript powered PMQs, so I look forward to seeing a smug, pixelated George Osborne receiving his parliamentary comeuppance.

Wednesday, 15 August 2012

More sweeping changes

These late nights are slowly killing me, but it's worth it - development has been progressing at its fastest rate in months:
  • The scripting engine has been revised for a fourth time, and now operates on C# scripts without the use of yield-powered coroutines.  This is, according to conservative estimates, about a zillion times better.
  • Runtime serialization is now powered by Google's Protocol Buffers (protobuf-net) as this works on all platforms and is ridiculously fast compared to XML.
  • Support for spoken dialogue has been added.
Also, many thanks to David Gouveia who very kindly sent me the source to his excellent A* & Clipper powered pathfinding system.  I'm hoping to be able to leverage this into XAGE as a direct replacement for the old, clunky Walkbox system, providing I can crowbar in some additional functionality:
  • Separate walkable polygons (that can be enabled/disabled at runtime).
  • Closest-point identification (when clicking outside of a walkable polygon).
As I'm happier with the current state of the engine than I have been for a long time, I've recently been collaborating on a little something with a gentleman who has been proven to be an impressive 30.4 times better than Ben10.  More on this over the next month or two.

Sunday, 17 June 2012

XAGE on Android

Taken a few minutes ago, here's the very first screengrab of XAGE running on Android (via Monodroid and Monogame).

Photobucket

Unfortunately the Android Emulator is decidedly more clunky than iOS and WP7, so I probably won't pursue this further until I have the appropriate hardware and licenses. At the very least it has satisfied my curiosity over the potential of Android as a platform, if not yet the viability of it in a real-world scenario.

Tuesday, 24 April 2012

First fruits of new C# Scripting

As usual, most spare time is devoted to engine work (with maybe a spot of Joe Danger here and there) rather than writing blog posts.  The new scripting system is really starting to come together, and thankfully has been compatible with each platform the engine supports, including iOS:

Photobucket

I'm really happy with how this is coming along.  Hopefully I'll have more to show over the next few months.