Archive for the ‘I7’ Tag

writing interactive fiction without a programming language

Warning ahead for a rambling post.

The English-like syntax of Inform 7 gets a lot of flak, mostly from programmers who say something like how programming languages should express concepts in concise and symbolic ways due to the nature of programming itself.

However one of my favorite things about Inform is not really the English-like expressions of ‘The Kitchen is a room’ or stuff like that, but how you can create new phrases. For example, from the I7 docs:

To make (character – a person) lose (point value – a number) points in the eyes of (voter – a person): …

To use that phrase, in your code you’d write something like ‘make Biff lose 10 points in the eyes of Buffy‘. Now if you were to translate that to a more conventionally symbolic language like Python for example, it might look like biff.score_points(-10, ‘Buffy’). In other words it’s a more verbose expression of the function.

It’s not that I necessarily prefer one syntax over the other — but what the first does is let you create a mini-language for describing that procedure of the program. Of course, that’s exactly what the Python function does as well. But because the first example is not necessarily couched in the syntax of I7 itself, I think the possibilities become much, much greater and more powerful.

Exactly how, well I’m still a little fuzzy on that. I’ve read a little recently about domain-specific languages, in particular I found this article about language-oriented programming. It’s rather out there but worth perusing.

I think I’ve said this before, but in using Leo recently it’s made me think more about what a program really is. It’s rather obvious it’s not a syntax file. However it seems, primarily, that few people examine and write programs in something other than a syntax file.

Leo takes that next step with its outline; I guess other tools such as debuggers and code browsers do something similar.

A question I seem to be orbiting lately is the somewhat unique case of how IF combines code and prose. In that sense IF isn’t too unlike a structured markup language like HTML, only markup languages rarely contain process — well, unless you count things like JavaScript. Regardless, language-oriented programming feels like it offers something to interactive fiction development. I think the synchronicity of the two terms is not a surprise. Dave Cornelson made an interesting post with regard to domain-specific languages at Intfiction. I don’t really like his choice of platforms but the core idea is worthwhile.

To get back to what a program is (forgetting the presumption of that statement for a moment) — an IF language that really was an IF-language creation language is another way of getting at that. If the IF author could specify how they create the work (and I mean really specify, not just within the specification of a syntax), is that another way of realizing the program?

A poet or a novelist is free to invent new constructs of language, new devices of storytelling or expression, in order to communicate the work. I guess an IF author does that by creating the process of the program — but is doing so within a defined syntax an unnecessary limitation?

A defined syntax obviously creates a framework an author can hang their hat on, and it makes it easier for authors to exchange examples and extensions to the core language. If every author created their own language for their work I can imagine any community collaboration could become difficult.

On the other hand it might turn out that certain mini-languages are more appropriate for some implementations than others. Does the barrier to entry become too high when, to write a work, you need to understand five or six mini-languages rather than just one syntax specification? Probably an IDE would obviate some of these difficulties…tools like the T3 Workbench or the I7 IDE do some of that already. But at the same time I’m not sure you’d want a very strictly defined IDE. Maybe something more like a Smalltalk environment? One with live code reloading…

Is it strange how these ideas keep turning in circles?

Advertisements

What we talk about when we talk on RAIF

Amid a little Inform 7 drama lately on RAIF I started to wonder how much of the conversation there actually is taken up by Inform 7. For those among my vast readership not familiar with RAIF, it’s the Usenet group for talk about writing interactive fiction.

There seem to be hints that Inform 7 may create its own forum for discussion, so I also wondered about the effect on RAIF of moving I7 discussion somewhere else.

I just browsed through the last month of topics (basically December) and categorized them as follows: Inform 7, TADS, design talk, meta (talk about RAIF), interpreters, community (competitions and the like), calls for game testers, and the convenient other. The results:

According to Google Groups stats there were 784 posts in December 2009 (I’m guessing many of these are spam). Was December an anomalous month in terms of number of posts? In general, no. Here’s the table:

The high count in November may have been from IFComp.

As soon as I get my horde of winged monkeys to tabulate all of 2009, I’ll report back.

Anyway, it’s always been obvious that many of the RAIF posts were on I7, but I never realized just how much. It’s not really a huge percentage in terms of the whole newsgroup, but it dwarfs each other category individually.

I wish there were some more numbers available, like how many active posters there are…a man can only dream I guess.

from T3 to I7

For the last year or so I’ve been messing around with TADS 3. I like it a lot. At the same time I was avoiding I7 — I had downloaded it, I even have it on my shortcuts bar, but I wouldn’t look at it except for when an interesting question came up on RAIF and I wanted to play around with the code. I was convinced that T3 was the language for me.

However in the last few weeks I noticed something — I wasn’t going back to my T3 game. So I started looking more at I7 — and now I’m hooked.

Part of the reason for the shift is, and I think it’s internally hard for me to admit this, but I just find I7 easier to use. I’m not a programmer, and it’s just harder for me to write in T3 language. I like the language. And one of the reasons I initially turned away from I7 was I looked at some of the I7 code and just found it horrid to read. But…

  • I like the T3 Workbench, but I like the I7 IDE more — again, probably because I’m not a programmer.
  • I read through the I7 manual chapter by chapter. This sold me more on the language.
  • I want to write games people will play on mobile devices — it seems like zcode is more widely ported, and will be in the future.