I was kind of expecting a wider range of programming languages to be mentioned, given that almost all of them can be used to create IF.
I used JavaScript to create House on Highfield Lane.
I chose JavaScript because everyone has it on the computer already, whether PC, Apple or Linux. Modern JavaScript (since ES2015) is a great language, and new interpreters are designed to run old code so my game should run on any browser for many years.
I mean, Lunatix: The Insanity Circle was written in BASIC. This was actually the game that introduced me to IF, and itâs only because I was teaching myself BASIC at the time.
I feel like the narrow range of languages is because coders tend to use what theyâre familiar with, and if you have any mainstream knowledge (hobbies or otherwise) or even industry coding experience, then itâs probably gonna be C/C++, Java, or (especially if youâre younger than 30 at the time of writing this) JavaScript.
I know other people have used BASIC before, but Iâve also seen Lua, too, specifically when someone tried implementing a parser game in Minecraft with the ComputerCraft mod.
We have over 2,000 adventures written in BASIC catalogued on CASA (and thatâs distinct adventures, rather than ports, and also doesnât include a lot of the more RPG combat-style games). Itâs easily the most popular (and portable) system we log; although we donât have a comprehensive list of Inform titles (which is the second most popular system).
This makes me so happy and I donât know why!
BASIC was like JavaScript is today - most computers had an interpreter built-in (albeit different versions), so the player could just run the game with no other set up.
âŚWhich makes me wonder about Java. It used to be on pretty much every computer, but has not been mentioned much at all (and a search of IFDB includes games in JavaScript). Was there much written in Java 20 years ago?
Java is a HUUUUGE heavyweight in general, but I think it fell out of favor in recent years (though itâs still my main language, along with Mono C#). I think it largely got superceded by a combo of C# and JavaScript, especially when Java started adding more and more features, so Java 8 or 9 was no longer always the standard. If youâre on Windows, itâs probably .NET C#. If youâre on Linux, itâs probably C/C++. If youâre on Mac, thenâŚidk. Mac is alien to me. But if youâre trying to hit all the platforms, then itâs probably JavaScript, because the industry movers and shakers see an insane new future where everything is a webpage, so universities and bootcamps are manically training new generations like me to worship at the dark thrones of npm, node, and yarn. Oof.
Ok, we go a bit off-topic here, but I think I have to correct this: You should take a look at WebAssembly, which is a compilation target for all kinds of programming languages and allows deployment to the web. So there is hope that sometime in the not too distant future we will be able to use real programming languages in the web area ;).
Oh, I donât doubt that for a second. Iâm just personally paranoid about not having offline copies of my programs, because Iâve been stuck without Internet without warning for days sometimes.
Otherwise, you will never see me denying the capabilities of webpages.
Depends what part of the software world youâre working on. Some industries are still Java top to bottom. In others, Java vanished twenty years ago and hasnât been heard of since.
If youâre on Mac, thenâŚidk.
You can install Mono/C# on Mac (or Linux) and do the same C# work you were doing on Windows. I was just doing this last night, in fact. (Trying to recompile an old Unity plugin so I can update Meanwhile for the new MacsâŚ)
If youâre targeting only Mac or iPhone, you can use one of Appleâs in-house languages (ObjC or Swift). Not many people are in that position, though. Itâs much more common to use a cross-platform toolkit. As you say, most of those are Javascript. Second place is a noisy argument between C#, C++, and probably Lua? I dunno.
I saw several statistics about this that showed always something different.
What I really donât understand: Who not using modern .NET for this? I mean, you can use .NET on all platforms now, including Windows, Mac, Mobile, Web, Linux. The only known restriction is that the MAUI component is not yet ported to Linux.
Iâm afraid I havenât kept track of the difference between .NET and Mono. Theyâre both owned by Microsoft anyway, right?
See here: https://dotnetfoundation.org/projects/mono
The story behind this is really strange. From my (limited) point of view, it looks like .NET has become exactly what the Mono developers originally aimed for: open source and cross-platform.
I take a view that IF can be rendered entirely in HTML and CSS3 (with a bit of Javascript for glamour).
I have learned that the structure of a narrative is a thing of complexity, so I choose what I consider the best language to assist me there, which I judge to be Python.
Whatâs really needed is some good open source libraries for authors who want to use this technology stack.
I publish one of them. No links here, but if you are interested, Iâll post a link in reply.
Javascript is every bit a ârealâ programming language. So WebAssembly isnât bringing real programming languages to the web!
But it does help us port older interpreters. Thatâs how Parchment can play TADS and Hugo games now. And probably all the other interpreters supported by desktop interpreters like Gargoyle.
Yeah. Almost exactly 40 years ago, Alan Perlis published a list of âEpigrams in Programmingâ. One of them is âYou can measure a programmerâs perspective by noting his attitude on the continuing vitality of FORTRAN.â
I think that was true in 1982 when he wrote it, it remains true today, and itâs true even if you substitute âJavaScriptâ (or âPythonâ) for âFORTRANâ.
Of course you wouldnât want to do the substitution IN FORTRAN because good god string manipulation in FORTRAN is a pain.
Fortunately not for Crowther and WoodsâŚ
you give also a solid explanation of why there was so many text adventures in BASIC: the trio of string manipulation instruction (left$, right$ and mid$) ease the coding of string manipulating routinesâŚ
Best regards from Italy,
dott. Piergiorgio.
Also, BASIC was included as standard with most of the early home computers. Other languages cost extra. Even PCs had some form of BASIC included up until Windows 98, IIRC.
Most early versions were interpreted, which is much more convenient when experimenting on a tape based machine.
Okay, that was provocative of me, of course. But to make it more precise: By ârealâ programming languages, I mean those that are type-safe, where many problems in the code are already revealed during the compilation process, and where you can run the applications in a real debugger. This applies, for example, to languages like C#, Java, C++, etc., all of which I believe can be used with WASM. I openly admit that compiler languages like C# bring a comfort to programming that I wouldnât want to miss and that probably makes you terribly addicted in the long run. Of course, thatâs ultimately subjective, I realize. But in JavaScript e.g. I would never voluntarily realize something that exceeds 10 lines.
- Most modern JavaScript IDEs have powerful type inference, even VS Code.
- Most enterprise applications use TypeScript which grants all those conforts.
- You could argue that modern JS is a compiled language in the sense that you never package and deploy the code you write. It goes through optimization and minification.
- The compilation step (for either JS or TS) is a lot faster than for C#, Java et al.
I find this ârealâ programming language discussion really dumb and a sign of either arrogance or immaturity. Every language has its pros and cons. I would never suggest you write an OS kernel with JavaScript, and I would never suggest you write a web application with C# (despite what .NET enthusiasts may believe). If you donât like higher-level languages, why donât you write straight in Assembly or binary?
By the way, just gonna leave these here: