Does anyone use a general programming language?

Does anyone here uses a general programming language rather than one specifically created to write IF (for authoring IF)?

If so, which one(s) do you prefer to use?

Edit: Clarification (in brackets).

1 Like

The question could be read in two ways. Either it asks whether or not we use and/or like general purpose languages, or whether we use them to create IF.

For my part, I do C++, C#, SQL and Python for a living (it’s going to be Angular + JS soon, but the threshold has been daunting so far). Of these, I prefer C++, probably because I’m weird.

I also enjoy dabbling in assembler for the 68000 and 6502, both for the sake of nostalgia and because they feel surprisingly clear and lucid.

There are a lot of languages on the bucket list though, and too few hours in the day.

But rolling my own system or using a mainstream language to implement an IF game, as some of the IF community clearly does, isn’t for me. I can’t envision myself improving on what’s already out there; I’m not Jon Ingold or lft, after all.

1 Like

I wrote a very primitive three-word parser in C++ about 10 years ago. More recently, I tried the same sort of thing in Python as part of a programming exercise with a friend. While both experiences were instructive, it’s not something I’m in a place to do with any of my WIPs right now. I haven’t yet released any work as it is, so for me this is somewhat academic. At this time, I prefer to focus on the higher level aspects of story and mechanics, dipping into lower level stuff as needed, which is much easier in languages specifically designed for what I’m doing. For me, having the skills doesn’t always equate to having the focus and motivation necessary to program the entire game, especially when considerations of cross-platform compatibility come up, which they always will. It’s nice to have a library and standards to work with.

TLDR: I use “general” programming languages every day, but at this stage, they’re a little too general for me to comfortably create IF with them.

1 Like

taking Bjorn’s first reading, I say that indeed I use general languages for, well, general programming/coding.

Best regards from Italy,
dott. Piergiorgio.

I too do code for a living. I have passing familiarity with C#, Kotlin and Java. Previously worked with Python and PHP. But I mostly work with JavaScript/TypeScript nowadays.

Of the IF authoring tools I’m familiar with, the one I like the most is Snowman (Twine). However, I don’t like that I’m stuck with an HTML file. I prefer something closer to ink (I don’t like ink’s syntax), which would allow me to embed the game in my own web app. So I’m slowly rolling out my own tool. Probably not a good idea :sweat_smile:.

I tried using Java. Before everyone beats the long-dead and pulverized joke of “Java is too verbose”, it was actually really good for quite a lot of it. I had a UI and prompt with contextual autocomplete and everything.

But then it dawned on me that once the engine was done, I would need to build the game world. I didn’t want to faff around with making an editor on top of everything else, so I decided I might just use Kotlin to code the game world, and import my Java engine as an API.

And then at some point I gazed longingly at TADS 3 adv3Lite, and it coo’d: “Come back, Joey. Come back, my sweet; you know it’s easier with me…!”

And I was like “Nooo but you lag when I try to create intensive simulations; I simply must fly free…!”

And then adv3Lite said “But, my love, I have multiple-inheritance for classes, and I have dobjFor-macros! I know those are your favorite! Please, come back to me…!”

And with tears in my eyes, and a quaking heart, I gave in. “Oh, how could I ever leave you, adv3Lite?” I wept. “It just wasn’t the same with Java! I’m so sorry!”

“It’s okay,” adv3Lite said. “All I want is for us to be together! Sometimes the destination includes all the steps along the way!”

And uh…yeah. I’m back to using TADS 3 with the adv3Lite library, lol.

8 Likes

I tried building an IF engine in C++ once. It was instructive, certainly! But it took me ages to get even a basic enough framework to do the “grate and keys” puzzle from Adventure. That’s about when I decided I’d learned what I needed to learn from that experiment and went back to Inform.

That’s of course not to say I don’t like general-purpose languages—my job involves enormous amounts of C++ and Python programming and so does my research. But to me, the most interesting parts of designing an IF work get buried if I try to reinvent the wheel. It’s more fun using a system—even a very limited one like the Scott Adams format—that’s already handled the very basics for me.

4 Likes

I’ve not even used much of the Python part of Ren’Py yet, let alone done a game starting from a general programming language. At this point, it feels too much like using a sledgehammer to crack a walnut.

2 Likes

I wrote the original version of my game in 6502 assembler for the BBC Master 128. This was to scratch a long standing itch rather than a practical choice. I was aware at the time that I was doing this for the satisfaction of doing it rather than in anticipation of anyone actually playing it. While the project was satisfying and a few people over at Stardot enjoyed it, once I started thinking about a sequel, it became clear that I’d made some poor design choices, so I rewrote the first game using PunyInform. After that interest waned.

3 Likes

I still use C, but that is deceptive since I usually beat it down to resemble whatever language best suited to the task.

3 Likes

I’m a programmer professionally, as are many others here from the looks. I usually use C++ and Python for most things, they cover all the bases except for web stuff (back to JS for that).

I’m actually working on my own IF game engine in C++. Rolling your own system always makes you appreciate existing software much more. I mean, I knew it was going to require a lot. But damn.

Side-note: The Inform language really urks me, as it likely does for anyone accustomed to traditional programming languages. It reads naturally, sure, but it writes no different than an esoteric scripting language, making you learn all the correct verbage and idioms to use. When I first tried it, I was just begging for a standard scripting language. That being said, I can appreciate the software quality, it’s well-made.

5 Likes

Harry, agree on C’s malleability, albeit sometimes need a degree of heating, as in metallurgy.

Personally I use C mainly when I need compact data sets (structs & bit fields… it’s literally a flagship language !)

Best regards from Italy,
dott. Piergiorgio.

3 Likes

Try Inform 6. It’s a completely different language - object-oriented and more appealing to the traditional programmer familiar with C-like languages.

6 Likes

For my part, I find it charming. I love how expressive you can get it, as long as you don’t pretend it’s a perfect subset of English.

Just for fun, I implemented the procedural galaxy generator from Elite in Inform 7. The idioms mapped surprisingly well.

3 Likes

As a TADS 3 fangirl, I’m obligated to tell you that you might also like TADS 3, if Inform 6 doesn’t quite scratch the itch for you. It’s a very bare-bones and extremely extensible object-oriented language with multiple inheritance and a lot of neat tricks from C, like macros, which can speed up execution quite a lot, and create some really interesting customized grammars for yourself. It has two main libraries that people use: Adv3 and Adv3Lite, the latter of which gets you off the ground faster, but with less detail built in.

I use VSCode with a TADS extension, and it honestly feels just like I’m coding in one of the major languages out there.

Also, if you detest object-oriented stuff, TADS 3 has plenty of way to “de-object” your codebase too, primarily with macros and “floating methods”.

3 Likes

Don’t make assumptions about what other people like.

2 Likes

As a professional software engineer, I disagree. There isn’t a language out there that doesn’t irk me in some way – Java, Python, JS, Ruby, whatever. Inform 7 is no different (I don’t know any Inform 6), but neither is it worse. In general, I’d say the right rule is to pick the language that’s right for the job. Java isn’t good for front end stuff, Python is poor for large scale mission-critical systems, etc. I think Inform 7 is a better tool for writing parser-driven IF than a traditional object-oriented language, for instance.

Are there things I’d like to see in Inform 7? Definitely. Among them:

  • a more concise way of expressing filtering expressions and conditions
  • first-class function objects
  • a more consistent object model – I’d like to be able to refer to an instance of a relation as an object, for instance
  • multiple inheritance – why is it so damn hard to have a container-supporter?
2 Likes

I use C# and all sorts of .NET functionality, primarily because I wanted to learn this language and framework. I did that as part of a game project and it worked out great.
I’m only marginally interested in specialized frameworks like Inform. Actually, it’s too specialized for my use cases, and since I really like to experiment, I don’t want to constantly push the limits of any framework, but be able to happily add to it when I feel like it.
Inform 7 nevertheless looks impressive and elegant to me. However, the approach completely passes me by because it is extremely English-centric and I primarily develop in German.

3 Likes

I use JavaScript quite a bit and I picked up lua for PICO-8.

Inform 7 is mostly a declarative language. If you come from a procedural programming background it can feel really foreign.

It may just be a matter of getting over the procedural mindset. Many years ago I had a tough time getting a handle on SQL, which is also declarative. “Where are the loops,” I kept saying…

3 Likes

Generic programming languages are painful to support. Javascript’s nodejs has two major releases per year and its community goes through six hype cycles in the meantime so you can’t really expect to run any two-year old source code without major rewrites. IF-tailored formats are much more stable.

1 Like