Wednesday, 25 March 2009

Misc. Gumf

Last update before release:
  • Added Copy/Import/Export mechanism - no more hacking through xml to copy items from room to room, or game to game.
  • Added integrated bug reporting, feedback and optional exception logging (all via Web Services) - hopefully this will only improve the quantity of feedback.
  • Added Font preview in FontManager - required quite a bit of work to import the XNA model into the Editor, but it works fine.
  • Tidied up field positions.
Finally I've implemented Asset Protection. What's this? Well, the Editor now has a Publish button which lets you select an empty folder to publish a completed game to. This isn't just a simple copy however - all of the game content is encrypted using a randomly generated key. This enables you to distribute your XAGE game without worrying about others cannibalising your textures, music and game code. Nothing's hackproof of course, but it does provide a certain degree of security.

Implementing this has taken quite a bit of work, and comes with one small sacrifice: Mp3 support. The reason for this is that I had originally been using the Windows Media Player library for PC audio playing but this component would only play the audio from a file rather than a stream, which is required for the encryption. The only way I could get around this was to save the the decrypted audio to a temporary file in order to play it, which of course defeats the whole purpose of the encryption.

Eventually I decided to rip the Media Player component out altogether and have now replaced it with SDL.net's audio, which supports loading audio via streams and therefore encryption. XAGE now supports the .ogg format for PC songs and, whilst it no longer directly supports mp3, it's easy enough to convert audio formats manually, plus there is the added bonus of future support for Midi and Mod files. Swings and roundabouts.

XBLCG Sales:

Whilst no concrete sales figures have been released, it appears that there's a reasonable amount of money to be made from the Xbox Live Community Games channel. At GDC Microsoft have announced that 'Several Community Games top sellers will be taking home more income from four months of sales than the average U.S. citizen earns in a full year'. Granted that's for the more popular games, but its not bad going - about $50k in 4 months?

The Blackwell Legacy:

For someone who would normally be described as a gamer, I don't get to play a lot of games. Almost all my free time is spent working on XAGE. In the last six months I've rattled through a couple of hours of Left 4 Dead and Mirror's Edge, and that's about it.

Last night, after reading Uhfgood's review. I finally got around to trying The Blackwell Legacy demo. It's a nice looking game, polished and well put together. From what I saw there's nothing in it that XAGE wouldn't be able to recreate - there'd need to be a few UI additions and implementing speech is an interesting challenge, but ultimately there's nothing that I'm yet aware of that would stop a title of Blackwell's quality being released on xbox live using XAGE.

Thursday, 19 March 2009

Recent Editor improvements

An quick update as the Editor is not quite ready for the next alpha:
  • Added a new unified viewer control to replace the different ones for managing graphics, animation frames and walkboxes. It includes magnification buttons, xnb support and no longer causes mild headaches due to incessant flickering. The highlighted boxes now flash so you can more readily see what you're amending.
  • Removed local anim offsets due to reworked animation offsets (renamed to the more sensible 'hotspots') - creating animations is now a whole lot simpler.
  • Automated script creation for characters/objects (turns a three step process into one).
  • Added Audio manager to support importing of wav, mp3 and xnb formats, all playable within the editor and for use with scripting.
  • Added Font manager to add/remove different spritefonts to game from stock selection.
  • Integrated OK & Cancel buttons into main editor, removed from dynamic panels (more intuitive, quicker to use, less scrolling).
  • Added saving & loading of Editor user settings (display settings, previous projects etc).
  • Added progress bars for loading and saving.
  • Replaced most of the crappy hand drawn icons with free, professional looking ones.
  • Tightened up field validation.

Currently working on:

  • Copy room/character/object mechanism (locally and to file).
  • Spritefont preview.
  • Integrated Bug reporting and Feedback.
  • Asset protection.

Wednesday, 4 March 2009

ClickOnce

I've figured out the distribution method for XAGEditor. In previous alpha releases I've bundled everything up separately in a .zip file. The problem with this is that XAGEditor and XAGE itself have certain requirements (DOTNET 2.0 and XNA GS 3.0 frameworks, DirectX). My temporary workaround was to include a seperate installer, "DummyGame.exe", essentially an empty XNA game which used the Microsoft ClickOnce method to automagically download and install these requirements. That way XAGEditor and the sample XAGE game would work.

This isn't an especially user-friendly solution. I've now changed this so that XAGEditor (which itself contains XAGE) uses ClickOnce. This means that users will go to the website, click on a button and XAGEditor and all the requirements will be downloaded. What's more, XAGEditor will automatically be updated whenever I publish a new version to the website. Brilliantly, this means I don't have to spend a day packaging up and testing a release and uploading it to rapidshare or megaupload or wherever - instead I can just click 'publish' on VS2008 and all end users will find XAGEditor updates the next time they use it (providing they are connected to the internet). I've tested this and it works like a charm.

I've been very impressed with the ease-of-use for the technologies I've discovered in the last few days. If I use ClickOnce, which I'm 90% sure I will, then all I have to be wary of is introducing any changes that break games relying on older versions.

The only issue remaining is that XAGE itself does not automatically install requirements. This is a problem if a creator wants to distribute their own Windows-only game. If they distribute their XAGE game to someone without XAGEditor (or the required frameworks) installed then it won't run. I can see three possible solutions to this:
  1. The creator can include the "DummyGame.exe" installer along with their XAGE game (not ideal but easy).
  2. The creator can build own windows installer for their XAGE game to ensure the requirements are met (more difficult but a more end-user friendly option)
  3. The creator could upload their game to a new steam-like online service (XAGE Launcher?). This would take a lot of work on my part, and there'd be all sorts of of bandwidth costs or even legal issues, but it could be a great way of unifying the game creators with their audience.
AGS offers something similar to option 3, but the catalogue of games is web based and the they are not hosted on-site. My way would be much more like a lite version of Steam or XBLA/XBLCG. And who knows, maybe I could eventually bundle in some payment methods so people can release XAGE games commercially without requiring a publisher. DRM is a thorny issue best left until another day, methinks.

P.S. It looks like XAGETOOL is being renamed XAGEditor. If anyone has any better suggestions I'd love to hear them.

Tuesday, 3 March 2009

XAGETOOL Progress

Focus remains on XAGETOOL (maybe I should rename this XAGE Editor, or XAGEditor). I'm continuing to make general improvements to ensure its as stable and functional as possible before release. I'll give a general summary when I'm closer to completion.

I've also sorted my web domain and hosting. The hosting is free and supports the .net 3.5 framework - there are a few questions marks over performance but I can always upgrade to a paid plan at a later stage. Irritatingly, all 'XAGE' related URLs were already taken so I decided to go with http://www.clarvalon.com/. This will give me more leverage to add new projects as and when they take form.

I laboured a few hours looking at socket programming and managed to get simple data exchange between a client and server, but I was a bit disheartened by how fiddly everything was. I then came across Web Services, which are an absolute joy. After about half an hour I was able to write a program that effortlessly connects to my website. The upshot of this is that I can build nifty little features straight into XAGETOOL/XAGE Editor/XAGEditor like online exception logging, feedback and bug reporting with minimal effort. It would also be possible to have an integrated game upload/download client as a means of distribution (think Steam). Whether my bandwidth could handle this is another matter.

Another possibility would be to port everything to WPF and Silverlight. As XAGE is solely 2D I'm pretty sure Silverlight would be able to handle all the graphical aspects. This would give the added bonus of portability, as Silverlight is browser-specific as opposed to platform-specific, from what I can gather. For now I'll just work on getting the original incarnation completed as I think the Xbox360 platform remains the biggest draw. It's good to know that, whilst there are some very specific project milestones, there are also potentially lots of future directions for XAGE.

I was able to test on a Vista machine (all my development is done on a brilliant little Asus EEE 1000H netbook with XP) and finally found and fixed a bug causing a few people problems when opening XAGE projects. This will now be sorted for the next release, which will probably be a final private alpha in a few weeks time.

Finally, I need to start thinking about documentation. The options seem to be to go with either an included .chm help file or an online wiki, or both. I do like Wikis but they live or die by the popularity of the subject matter. Maybe I'm just being lazy in hoping a wiki would mean some kindly soul will write the documentation for me.

Thursday, 19 February 2009

Fontastic

Due to various commitments I've barely made any progress in the last few weeks, though I have implemented the font bank so you can import your own .xnb spritefonts and assign different ones to each character (useful if you want to make a narrator using a blank character, for instance). Any free time has been spent researching the best way to deal with that niggling Windows sound issue - at the very least I want to be able to support users importing their own .wav and .mp3s to be used as background music or sound effects. It seems that there are two remaining feasible options:

  1. SlimDX: An open-source c# wrapper for accessing DirectX functionality through managed code. This is the right idea, though I cannot find any pertinent code examples that use DirectSound.

  2. MCI/Mediaplayer: Invisibly use windows media player the audio. It's a bit of a dirty hack and I'm not sure if it will allow multiple sound sources, but it's definitely the easier of the two options.
At the moment it looks like I'm leaning towards the media player option - the wrong option, no doubt, but the easiest for now and it'll help tick things over until SlimDX matures. All this agonising over design decisions is just me thinking out aloud - when XAGE is done all the internal workings will be abstracted away from the user. It'll just work™.

Saturday, 7 February 2009

Conditional Logic

Mercifully, plumbing in the conditional logic turned out to be a lot more straightforward than I'd anticipated. Adding the functionality for variables to the new XAGETOOL only took about 45 minutes, which is testament to the new design (even if do say so myself).

Scripts can now manipulate and act upon user-defined variables with simple IF, ELSE, ENDIF actions, as per this toy example:

Photobucket

It was possible to achieve the above by changing the attached script associated with the door's onOpen, however the more complexity you add to your game the number of scripts you require grows exponentially and it quickly becomes a complicated mess. The conditional logic is a simple way of negating this. I don't at present expect to need to implement nested IFs - besides, the user can always invoke new scripts depending on the outcome of the original IF statement.

Variables aren't type specific; XAGE will automatically determine whether the variable is numeric or non-numeric, so you can do things like "IF $MONEY is greater than 500". Also, the drop-down fields are pre-set with 'TRUE' and 'FALSE'. These are treated as strings but they essentially provide boolean functionality.

I've always wanted XAGE to include non-technical types amongst its target audience. The conditional logic is the only thing that remotely resembles code, but I can't see it putting anyone off as it is hard to imagine anyone not understanding the concept behind an IF, ELSE, ENDIF statement. For this reason, I've made it as verbose as possible: 'greater than' rather than '>'.

It is creating the sample game that will really put XAGE through its paces and expose its strengths and weaknesses. For example, it's already obvious that I need to add a popup to visually get x,y coordinates to make it easier and quicker to add various script actions (WALK actions inparticular). It's very important that I address any weaknesses before v1.0 is released, hence why I keep harping on about feedback from the alphas.

Once the oft-delayed dialogue system is out of the way, I only have two real headaches. Both relate to asset creation, and the previously mentioned .xnb file format problem:
  1. Sound: For xbox development this isn't a problem. Anyone developing for the 360 will easily be able to convert mp3s and wavs to the required .xnb format using Visual Studio/XNA GameStudio. Windows-only developers however need to be able to import their audio files without converting to .xnb. This means I need to implement songs and sound effects using DirectSound alongside the standard XNA implementation. Unfortunately, as I don't currently have a dedicated internet connection, I won't be able to get my hands on the DirectX SDK (483MB) in the near future.
  2. Fonts: As above, sprite fonts are converted by visual studio into an .xnb format. It's less of a problem however, as I can convert a bunch of free fonts myself in various sizes and include them with XAGETOOL. This way the user can simply use XAGETOOL to import the desired fonts into their game.
Allowing GUI customisability will be a bit of a pain to code but shouldn't be too difficult. I'm hoping the rest of the outstanding features are trivial and there'll be no showstoppers.

Thursday, 5 February 2009

Up the TreeView

Some of the feedback I've had from the latest Alpha has been excellent - very thorough and thoughtful. It's much appreciated.

I didn't actually mean to lie when I said I'd be focusing on new functionality - instead I've completely redesigned the XAGETOOL user interface:
  • I've replaced the numerous listboxes with a single treeview (think Windows Explorer) - this makes everything look much less cluttered and more intuitive to use, as the user can visually see how all the game content fits together, room by room. It also makes it easier to add new functionality via context-sensitive menus (e.g. I've added an 'insert new ...' option for items in which the order is important, such as script actions or animation frames). It also means that the UI is now completely resizable.
  • The popup dialogs have now been replaced with a panel embedded into the front page. Now you can traverse the tree whilst editing items, and it also removes the size limitations of the popups.
  • The load/save buttons are gone and in there place is a proper menu strip. This gives it a much more familiar look and feel, and consequently it all seems a bit less amatuerish.
  • There's now a nice green, shiny 'Play' button which starts your current XAGE project game. XAGETOOL now also contains all the required files, so essentially you can create an XAGE project completely from scratch without having to cannibalise the example game as in previous versions.



Photobucket

All in all, I'm pretty pleased with how it is turning out. I have a vague design for my dialogue system, so it's about time I implemented that. There's also now a roadmap on the project status panel on this blog, so you can get an idea of where XAGE currently is and where it needs to be for v1.0.