Wednesday, April 16, 2008

Game development with oAW

Last week Jens Wagener posted a small riddle in his blog. He stated that it is claimed that 98% of all people are incapable of solving it.
To put it short: I didn't solve it. (Thank God! I'm not that freaky ;-))

But hey, as we're currently testing our next release of openArchitectureWare, I thought I should give it a try and do something which helps solving it (our at least help to understand that it is really hard to solve ;-)) using oAW.

So first I wrote a DSL implemented in Xtext and then I specified the constraints outlined in the riddle using Check. (At this point you should have read Jens' post so you can understand what I'm talking about)

Using the DSL one writes the attributes (Color, Role, Pet, Language and Magazine) for the five houses down, one house per line. As I said the constraints outlined in the riddle are implemented using Check. So if there are any of theses constraints violated the editor provides the appropriate feedback.
The puzzle is solved when all markers have gone and there are no more wildcards 'X' in it.

This is a screenshot, of the "game" implemented in oAW:

So if you want to play around with it, just drop me a mail, and please don't come up with boring rule engine solutions ;-)