Monday, July 07, 2008

Inform - first lesson learned

As a programming language inform is an excelent tool for writing fiction. Take the built in 'What not to wear' example. On the one hand it shows how far the language can be pushed. On the other I haven't seen code this contorted since reading a book about Visual Basic 6.

Examples like this really show how much Inform is not natural language.
To be honest I still can't understand how the damn thing works. Getting it requires a much deeper understanding of Inform Grammer then I currently possess. Here Lies the nub. Inform makes simple things simple, and allows you to write interactive fiction. But like most special purpose tools it makes hard things harder.

From a language point of view we have conditionals, looping constructs and an object hierarchy. We can also construct data tables and lists. All in all we have a language which is not only Turing complete, but as feature rich as general purpose languages like Java. The problem, form a programming perspective, is that we have a syntax which can be more cryptic then Perl!

The short answer; If Clothing is not a central focus of your game; ie your character is not a catwalk model, then don't implement a generic clothing system. Changing a characters description when they put on a Jacket, or a Has mat suit is so much easier, and for most games is all that is required.

The other problem with overloading your games with generic systems is that most will be published as Z-code files, and this places some major limitations of executable size. Recent posts I've seen on suggest that even the z8 standard has trouble reaching novel length (about 50,000 words) and that is without including bucket loads of extra real world simulation rules.

Sunday, July 06, 2008

Interactive Fiction

I've been toying with the idea of writing a text adventure for a few months. Granted I didn't do anything more than think about it untill a Random post on slashdot, or ReadIt (I forget which) linked me to Inform7.

Suddenly I discover that there is a thriving home brew community writing and playing Interactive Fiction. And Inform is a rather interesting approach to writing it.

Interestingly while story files are free they are not open source, as most games are shipped in binary form only.

Inform 7 is both very enticing and frustrating at the same time. Its goal to allow Interactive Fiction to be written in plain english is admirable and works quite well for simple cases. However in the end it is not english but a language which overlaps with it. The upside is it looks cool, and the fact that you are porgramming is generally hidden from few. The downside is that when you do need to do some programming you end up with a very verbose syntax, which often does not make sense as an english sentence.

For example: 'the list of things carried by the noun'. In English this is nonsense as nouns can't carry things, however it does make perfect sense to inform. As a comparison I had a cursory glance at Inform6 and TADS3, and there really is no contest in the given domain.

With inform I feel Like I'm writing a story, while with the others I'm very clearly programming. The challange now is to write somthing worth playing. Now I have a plot in mind, and I'm learning the tricks on how to extend inform to do new things. This leaves one stumbling block: I've forgotten how to think about Interactive fiction puzzles, solving them is hard enough, actually writing them, well I'm yet to come up with an interesting puzzle. Guess I need to play more Interactive Fiction first.