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.

Monday, 19 January 2009

XAGE Private Alpha v0.2 - Download

The second alpha release is now ready. There is a changelog with the attached readme, but here's a summary of the main changes for v0.2:
  • XAGETOOL now works with XAGE projects ("Game.xag") which references five sections of inerpreted game content (intro, menu, tutorial, game & credits).
  • XAGE now takes any size for game screen, so can be used to develop retro 320*200 titles or 1280*720 behemoths. Each section can also have its own screen size and scale, so a retro game can still have a fancy Hi-Def intro and menu screen.
  • XAGE games can now be deployed to the xbox 360 with the included skeleton project for Visual Studio 2008.
  • Numerous tweaks and bugfixes.
There's a lot of fiddly little things to deal with for Xbox games to ensure you'll pass peer review, like dealing with unexpected controller unplugs or profile sign-outs. These have now been dealt with. The next release will focus on the outstanding functionality. As usual, if you'd like to get your hands on it, please email clarvalon@live.co.uk for the download link.

Saturday, 17 January 2009

"Writer's Block"

It seems that someone's beaten me to releasing the first point & click adventure game on the Xbox Live Community Games channel. I've just had a quick go of Writer's Block and the similarities and differences between it and anything XAGE produces are interesting (to me, at least).

Both have SCUMM-esque interfaces, though WB toggles the GUI with a click of the left shoulder button whereas XAGE always displays it at the bottom of the screen (as per the LucasArts games). Early on in development I played around with various ideas for the interface similar to what the guys behind WB have gone for. In the end I settled on sticking as closely to the winning (Lucasarts) formula as possible, as it turned out that using the thumbstick for the cursor wasn't nearly as laborious as I thought it might be. In future, if there's a demand for it, there's nothing to stop me adding functionality for a Sierra style interface. It's purely because I much prefer the SCUMM system that XAGE uses it.

I quite like Writer's Block, and seeing a complete adventure game at a high resolution on a tv screen is refreshing. There are a few things in it that I'd have done differently - the dialogue system in particular is a little clunky, and the character graphics, whilst pretty decent, suffer from that 'beanpole' style that seems to curse most AGS games. I don't regard WB as competition as such as any game that brings more attention to the genre can only be a good thing.

Tuesday, 6 January 2009

Bye bye, Guybrush

The placeholder Monkey Island graphics will soon be replaced. In a way this is a shame as they're obviously of professional quality and gave the XAGE youtube videos an extra layer of polish.

I'd expected that I'd need to replace them with either some suitable public domain graphics (none of which I was able to find) or to approach an AGS developer to use theirs. In fact the answer had been staring me in the face all along. In the mid-90's an elder brother and I had spent countless months of our misspent youth making simple adventure games with AMOS for the Amiga 500. It transpires that my brother had actually recently managed to convert a bunch of our (mostly his, my creativity has always been highly derivative) deluxe paint drawings of various characters and locations. At some point Guybrush and the Governer's Mansion will be replaced with Artichoke and the island of Uh-Oh Yeti:

Photobucket

Also, I've contacted the creator of an AGS game who is potentially interested in converting his game to XAGE for release on the Xbox360. Nothing is set in stone yet but this is a particularly exciting development and can only make XAGE more robust as I implement all the functionality I've overlooked as part of the conversion progress. It should also be possible to automate parts of the conversion, specifically dialogue trees.

Tuesday, 30 December 2008

XAGE v0.2 Progress

XAGE goes HD: XAGE now accepts any gameScreen size. There are still a few scaling issues to resolve - I aim to add GUI customisation to XAGETOOL at some point. Here's XAGE using a background texture I borrowed from the AGS forums: Clicky.

XAGE on the Xbox 360: The next release will include a XAGE as a library, along with a skeleton VS2008 project for easy assembly and deployment to the Xbox 360. You'll need an XNA Creators Club membership (though you can occasionally get free ones).

Here's a low-quality clip showcasing the following:
1) XAGE running on the Xbox 360
2) Introduction and Menu scripts (essentially non-playable mini-games)
3) Simple loading & saving (one slot only at present) and X360 storage selection



The above two features were implemented due to requests I received after v0.1, so your feedback is taken seriously and is appreciated. I'm not sure on the ETA for v0.2 yet - there's a fair amount of refactoring to do that I've put off for a while. You can still get your hands on v0.1 by emailing me as per the below post. At some point there'll be a online bugtracker to submit bugs and feature requests but it's probably overkill at the moment.