Interactive Fiction, (IF). Inform 7
I am checking Inform 7 out to see how it works as an IF tool.
I thought I would note the site here and see if anyone wants to discuss this engine in relationship to our past talks about text parsing/trees etc. and the potential for some sort of extension along those lines.
If anybody has tried, (and I have) to create a text adventure system for MMF2, you know how complex it can get. I have had some results, but I wouldn't recommend it for the casual user, so we sure could benefit from something that would take care of some of the major aspects of IF games. I think that MMF could even add some nice enhancements to text games once there is a game structure and language parsing available.
Here is the state of underground, but still surprisingly popular text IF genre:
http://www.strangehorizons.com/2008/20080526/0jessup-a.shtml
Here is the link to Inform 7, (and 6). They are free and open source under GPL. What is cool, (and I am about to install it) is that it programs the IF in natural language. Let's see how that works out ;)
http://www.inform-fiction.org/I7/Inform%207.html
Re: Interactive Fiction, (IF). Inform 7
I see that you need an interpreter to "play" the game, but they are free and open source, too. One is based on the old Infocom parser, and the other is more powerful and updated.
This is really fascinating. It uses plain language, (which is subject to certain rules and still requires special syntax skills, etc.).
For instance:
====================================
The Forum is a room. "You are in the Clickteam forum. It is a vast network of virtual people with visible software code on the walls.
You see the Internets to the South and a dungeon to the North. Thick walls of swirlign digits are to the East and West."
To the South is the Internets and to the North is the Dungeon.
Novabrain is a man in The Forum.
Before examining Novabrain, say "Hello user!"
The description of Novabrain is "A very fat man with a monacle and mustache ;)!"
================================================== =============
>Look at Novabrain
>A very fat man with a monacle and a mustache ;)!
Another example:
A color is a kind of value. The kinds of colors are red, green and blue.
Now you can use random colors using [color].
Of course, it can get very complicated like any programming language depending on what you want to do, so it is flexible and seems very easy to learn. This is really something to think about for the future.
Re: Interactive Fiction, (IF). Inform 7
Ahem! Type and play ;) :
The game genre is pinball. The frame size is 800x600.
The background is placeholder.jpg. Send it to back.
The obstacles are active objects called bumpers using classic.jpg graphics. The animation speed is 50. The bumpers are placed using the grid, mygrid. Mygrid is pballdefinition.grd with cell size of 32x32.
The paddle is mypaddle.gif, 60x32, animated, and starts in cell 33 of mygrid. The paddle uses 8-way movement restricted to horizontal.
The animated ball is 32x32 and starts at screen width center and just above paddle. Ball direction starts as random 32(+-4).
Etc.
Of course, that would define a game environment that you could then tweak graphically, perhaps? It is all in the interpreter, ey?
Re: Interactive Fiction, (IF). Inform 7
Hi,
It's a very nice concept. Good to see Click products being so flexible as to expand in almost all directions :)
Re: Interactive Fiction, (IF). Inform 7
Oh, a cool note: There is a free, Java version of the interpretor that will play the .blorb files you create with this. So, you can easily make a package of your game or put it online, on your website.
http://zmpp.sourceforge.net/#toc2
Cool!
If I ever get a playable game created, I will put it online ;) The syntax of Inform 7 is not too bad once you play with it a bit. The documentation and examples could be better though.
2 Attachment(s)
Re: Interactive Fiction, (IF). Inform 7
Here is a mini-Zork game using MMF2 as a wrapper for an HTML page that loads a Java applet that then loads the z-code file ;)
It uses the package I noted above. It can also use zblorb files that Inform 7 creates.
What are the chances, (the z-interpreter and inform 7 are open source) of getting the interpreter into an extension so that text could go in and out via MMF2's screen? That way, we could at least parse the user test and response to use as triggers in MMF2.
However, there are a few points:
It would be nice to be able to write your script for your game with scintilla doing the color coded formatting, (see Inform 7) and then being able to run and debug, possibly. That's not absolutely necessary, just a nice idea.
Also, Inform 7 uses free "extensions" which I think are just blocks of text that redefine or predefine actions, procedures, etc. The way it uses them is via an include line in your script: Include The Great Extension by Grue Barrymore.
I could see an interesting marriage between a good interpreter and MMF2 because I don't think you need much more interconnection than being able to check the text and then use it to trigger events like sounds, graphics, etc. MMF2 could "talk back" to the game, I guess, too. Though it would be nice to have some higher level way to interact ;)
Simple stuff is easy to script, but more complex items can be a bit tricky. You could use this as a "plain text" way to do adventures and even other things because of the logic and flow.
Re: Interactive Fiction, (IF). Inform 7
I think, after looking I7 over ...
If we had an extension based on this, it might have some specific parsing/intercepts built-in. Done with some foresight, this could be very powerful.
From what I see, there could be an 17 extension with what they call "Rulebooks" and such. That could be written specifically (using the Inform structure) to treat MMF2 like a special, game "character" so that the MMF2 extension could flag, capture, and send interactive messages between the software.
Example:
Game Text:
(MMF2 gets the strings and we Event it so that non-programmatic text is suppressed.)
LARGE ROOM
You are in a large room. There is a an statue of Elvis in the center of it.
(now, like creating a chat we have a line that we won't reveal to the player and a marker could preface it:)
MMF2 Does load picture "ElvisStatue"
MMF2 Value Myvalue = 100.
MMF2 String Mystring = Play Elvis song now.
We do want that to be flexible, but some easy to understand ways to have the story code tell MMF2 what to do would be better as long as it does not get too complex. Like a chat or other apps, knowing what's coming is faster and requires less work for the author if the extension can intercept and flag certain items conventionally.
If this did become an extension project, it would help greatly if the developer was very familiar with the syntax and structure of I7.
I would kind of wonder if Emily Short and the people who worked on the 7th version would find interest in being able to transport games and write for a medium that has rich multimedia, can generate executables, create web content, and even Java applets.
There are still a lot of people involved in IF as a hobby and I see a potential renaissance if it could come under one, upgraded roof. There are many compilers, tools, and methods (see Gluix) that try to bring IF forward.
Think of the potential of natural language scripting. In effect, a game scrip could be as much of a control/flow feature for MMF2 authors as it would be fore games. This could be a perfect solution and exciting marriage of ideas.
We could think of MMF2 an interactive character in any IF script that included an IF-based MMF2 Extension, if the Infict MMF2 Extension is possible to create.
Re: Interactive Fiction, (IF). Inform 7
I wanted to note something important and interesting!
When you run the mini-Zork example up there in the MMF2 application, you can type save and restore your progress at any point in the game. The Java allows you to save and load your progress on the machine only in the application's folder.
That works when you run it locally on your browser as well. I imagine it also works online.
2 Attachment(s)
Re: Interactive Fiction, (IF). Inform 7
Here is a mini, proof-of-concept idea script. Not really much of a game, but enough to illustrate the concepts.
I have included the text source of the game script, (but not the project file). Note: I am not sure you can just just copy and paste this text into Inform's editor and have it run right. The tabs are important to the syntax, so if they translate, then it should work oK in Inform7 without errors.
The game has a little scoring and can be won or lost in a short time, depending on what you do ;)
Just put the files in a folder and load the .mfa, run it, and play.
Notice that there are many situations where I can and should give feedback in the game, but have not yet. That's the art of text adventures.
Just to make it a little easier: Examine things like the browser, other things, and characters ;) Something could end the game in a bit after you do it, so it might be something to wait on. Twenty points wins the game automatically.
Re: Interactive Fiction, (IF). Inform 7
I wanted to add:
There is an online MUD, (Guncho) that uses Inform 7 as its basis. They have a special extension (Guncho Mockup) that handles all the specifics for an online, multiplayer game when authoring it offline.
That would be a good example to help inspire a powerful, and easy way to create online MUDS using MMF2 with Inform 7 scripting. There might be some real potential here since Inform can handle so much of the important stuff for our users.
I would note that they use the Glulx version of Inform projects. Glulx is an extended version of the z-code that provides larger memmory and some limited graphics and sound capabilities.
We could go with Glulx as well, but all we would want is the larger memory for less limitations.
http://wiki.guncho.com/index.php?title=Main_Page
Here is what some of the Guncho Mockup code looks like, for reference:
A PC is a kind of person. A PC is usually proper-named. The PC kind translates into I6 as "i7_pc_kind".
A PC can be reserved or unreserved. A PC is usually unreserved.
A PC has indexed text called the mud-name. Rule for printing the name of a PC (called whoever) (this is the PC name printing rule): say mud-name of whoever. Understand the mud-name property as describing a PC.
The description of a PC is "[possibly customized description of the item described]".
After examining a PC (this is the list PC possessions after examining rule):
if the noun is wearing something, say "[The noun] is wearing [a list of things worn by the noun.";
if the noun is carrying something, say "[The noun] is carrying [a list of things carried by the noun]."
To say possibly customized description of (victim - PC):
let custom desc be player attribute "description" of the victim;
if custom desc is "" begin;
issue library message examining action number 2 for the victim;
otherwise;
say custom desc;
end if.
A PC has a number called the mud-id. The mud-id property translates into I6 as "i7_mud_id". The mud-id of a PC is usually 0.
Mud-identification relates a number (called ID) to a PC (called whomever) when ID is the mud-id of whomever. The verb to identify (it identifies, they identify, it identified, it is identified) implies the mud-identification relation.
Mud-naming relates indexed text (called the name) to a PC (called whomever) when the name is the mud-name of whomever. The verb to name (it names, they name, it named, it is named) implies the mud-naming relation.
The PC-corral is a container. The PC-corral object translates into I6 as "i7_pc_corral". 25 PCs are in the PC-corral.
Definition: a PC is connected if it is not in the PC-corral.
Definition: a PC is disconnected if it is in the PC-corral.
To transfer consciousness from (source - a PC) to (target - PC):
now the mud-name of target is the mud-name of source;
now the mud-name of source is "";
now the mud-id of target is the mud-id of source;
now the mud-id of source is 0.
.... snip
Re: Interactive Fiction, (IF). Inform 7
Really nice concept. I loved playing text games and that makes me download some games just for the nostalgia. :)
Re: Interactive Fiction, (IF). Inform 7
Programming with natural language? Woah.. as in.. why?
It's like programming, but for people being too lazy to learn the programming language but eventually have to actually do more, because the syntax is more complex than "real" programming and you have to write ten times as much to yield the same result? Plus it is much more difficult to read which would make it very difficult to maintain..
Interesting idea at core and certainly fun to control a character IN text games.. but to program like that? Cumbersome?
The only thing I can see that would be somewhat entertaining is.. coupling it with voice recognition software. And then lying on the couch dictating your game to the computer.
But looking at the example, I see a simple script can quickly turn into a book. Sorry to be so pessimistic about this, but I fail to see the advantage.