What do you use to program your IF?

Common question that I never knew an answer to.

For me, I’m writing my own engine in Visual Basic .NET. It’s not a great language, but it works well enough. 20 lines and you can start writing out the whole game. 25 and you can already do your first input and output.

I’m not sure there’s a language that someone hasn’t used to write text adventures.

There just was a really interesting post on Planet IF about Zork, comparing games written in MDL and Fortran.

Why am I not doubting this? :laughing:

According to detractors of Inform 7, English is just such a language. :wink:

Great. Now you’ve done it. Someone is going to start going through the archives, and eventually find a language that hasn’t been used to write text adventures, and write a text adventure in it. Just watch - the next speed IF will have a “Sorry about the quality but that’s all I could manage in whitespace [or OISC]”

Probably not Malbolge though.

I believe that people who try to write their own authoring system in order to write their own text adventure, aren’t actually interested in writing their own text adventure. What they really want is write an IF system. They just don’t realize that.

Let’s take that a step further up. Suppose you want to write your own authoring system. But you don’t do it in C, Basic, Java, whatever. You write your own general purpose programming language, in which you then attempt to write your own IF authoring system. I don’t believe your goal was to write your own IF system. You wanted to write your own GP language to begin with.

Why don’t we write in 6502 or so-- oh, wait. We’ve done IFs before on the Atari 2600. Never mind. :laughing:

Actually, the engine work is very fast and simple for a text adventure game on VB, since you just have to make a loop and make it not crash by requiring key input.

Let me guess, it doesn’t run on Linux or Mac OS X, right?

Too late – Adam Thornton already did some large proportion of Mentula Macanus in Whitespace for TWIFComp. (Where the source code had to be 140 characters or less, not counting white space.)

This makes sense to me. What I suspect happens is that someone is learning Programming Language X and is looking for a project with which to polish their X skills. At that point, writing a text adventure becomes a very attractive option. Easy I/O, and no messy graphics to contend with.

[Edit:] This wouldn’t apply to Javascript, of course. The reason to write a game in Javascript could be that you DO want access to graphics and sound in a cross-platform delivery system.

Well, in the sense that a “text adventure engine” is nothing more than a loop that accepts key input, then outputs something and then goes back to the beginning: yes.

In all other senses: no.

First, there is the parser; the part that deals with understanding the player’s commands. A two-word parser is simple enough, but anything else requires work. PUT THE LAMP AND THE SWORD ON THE TABLE or JIM, GO NORTH or even OPEN THE DOOR when two or more doors are in the location, can be tricky.

Then there’s the world model: rooms, objects and non-player-characters. Things can be in and on other things (or even under or behind other things), things can be part of other things, containers can be open or closed, making stuff visible or invisible (or visible but untouchable in case of a closed transparent container) – again: this can be simple or complex, but it does require some thought at least.

Then there’s the question of how you will implement actions (taking & dropping stuff, attacking stuff, opening doors etc) and events (the ship crashing; night falling; the bear attacking) programmatically.

The list goes on and on.

Now I suspect that your answer might be: “I’ll start with the basics and take it from there” which is fair enough, I guess, but you should ask yourself this: there are great IF authoring tools out there that are doing all the things I mentioned out of the box. Systems which have taken years to build to reach the level of efficiency and complexity they have today. So why would you want to re-invent the wheel?

If your answer is: “For fun” or “Because I want to get better in Visual Basic” that’s fine, too, but then your goal is not “writing a text adventure”.

Maybe you want to do something that simply cannot be done with one of the existing systems? Is it worth spending weeks or months – even years – re-creating the basic functionality of an IF authoring system for that particular feature?

If yes, then good luck!

Matt

It’s more back onto “I need to get better in VB” than “I want to write a text adventure”, but the actual concept of explaining a story without graphics always interested me because I want to prove (again) that you don’t need graphics to make a good game.

Also, I have a love of writing engines for some reason. It’s not long to do, just a bit annoying at times. Besides, what’s wrong with having another engine to choose from and one that I (and a lot of other people) would find it simpler to write in?

EDIT: I just looked at I7. I don’t even know how is that code, but that’s really simple. I’ll still stick with VB, though.

EDIT2: I had an idea of something that I know can be achieved with my engine. Text-adventure Pokemon.

So I7 is the only one you looked at? Hell of a job in research you’re doing there :mrgreen:

I know, right? I’m so lazy! :laughing:

Laziness can be a virtue. :smiley:

I’ve changed my opinion of this over the years. I think in the early stages it’s better not to do much research but just start working in whatever you have at hand. That way you’ll get an idea of whether you like it or not and have a more informed opinion when you do start looking deeper. Too much research early on can lead to a kind of analysis paralysis.

If you get to a point where things aren’t working it’s important to realize you should cast your net out wider of course.

I hate to burst your bubble, but if I7 was simple, this forum wouldn’t exist.

Here’s an example of an I7 game: enjoy. If you’re lucky, you can avoid your code looking like that when you’re done. I just barely avoided that with New Cat, but there are plenty of other reasons why I7 is not as simple as it promises to be.

And BTW, I7 sucks because it puts on the appearance of being English and then uses words in bizarre, nonsensical, highly-restrictive ways, and does so without consistency. (Remember that one huge file is JUST AS useable as many smaller files! It’s the I7 way!) Sigh.

No, you don’t.

Why is “leeg” a swear word?

Wait, I7 needs your whole source in a single file? Seriously?

The existence of extensions would seem to suggest otherwise…