General Programming Languages for IF Authors

Question for discussion: what’s the best general programming language for an IF author who wants to make more ambitious games?

My general experience when making a game is that of trying to wrangle the existing set of tools I’m familiar with into a form most approaching the vision I have in mind. Often times I rollback from my initial ambitions due to my own limitations and the limitations of the tools I’m familiar with.

I know vaguely that being able to use javascript would allow me to do more ambitious things with Twine. C# would allow me to use Unity which then can work with Ink. What else?

2 Likes

What kind of ambitious stuff do you have in mind?

I just realized what your avatar is… are you thinking of games similar to that? Do you need 3D stuff, or is 2D good?

Well, I have a lot of different things in mind-- I always have half a dozen projects on the go at least. 3D sounds like too much work to reward for one person, so 2D is fine. Some ideas I’ve had to put on the backburner until my skills improve:

  • Using Inform to make text adventure with visual panes (Gateway came out in '92-- why can’t we make stuff like that easily any more?)
  • Twine-like choice game… but with panes for character portraits (how did Hana Feels do that? Is there an easy way of having multiple panes?)
  • Choice game, but with a map screen for navigation.
  • Actual point & click adventure games (I’ve plinked about with AGS but it feels limited to very trad kinds of adventure game design)

I also know that if I knew how to do more stuff, my ambitions and ideas would expand with my capacities.

2 Likes

If you’re interested in doing web stuff, learning JS + CSS + HTML is probably the path of least resistance… although these days we can also build native code for the web, thanks to tools like emscripten and inventions like WebAssembly. I wouldn’t recommend starting out with that, though.

Putting web stuff aside, one thing to consider is that you may have a choice of languages even if you decide to use a particular engine/framework/library. For example Unity also supports Boo (similar to Python) and a JavaScript variant in addition to C#. So if you’re set on trying Unity, you could take a look at all three languages and see which one you prefer.

In many cases, you have even more flexibility. For example I knew a guy building a game in Racket on Irrlicht Engine, who eventually decided Irrlicht’s collision detection wasn’t adequate and added Bullet into the mix.

For this kind of setup to work, you need to pick a language with a good FFI and use libraries that are either written in C or offer a complete C API.

Long story short, you’ve got lots of options.

Whatever you choose, I’d actually recommend starting with a clone of a very simple arcade game, like pong or a block-breaking game, or asteroids or something. This way you have a clear goal and nothing to think about except learning the language and whatever libraries you decide to use. Then move on to creating the game you actually want to create.

Personally, for cross-platform, arcade-style games I’ve been really happy with Lua as a language and SDL and related libraries (SDL_ttf, SDL_image, SDL_mixer) for IO and window management stuff. I don’t see any reason you couldn’t do a point-n-click adventure using the same setup. I don’t know of any suitable high-level libraries geared toward IF stuff, but someone else here probably does.

Lua has a very small API, not much syntax to learn, and is pretty intuitive. People with a few languages under their belt can usually more or less master it in a weekend, and I’d guess it would be a good first general-purpose language also. LuaJIT has a great FFI, allowing you to hook up to C libraries. It’s fast and small compared to similar languages.

If you want to try Lua and want an all-in-one solution, you might try LÖVE, which mostly stays out of your way and offers a nice abstraction on top of SDL, with some other enhancements. It has a pretty active community and you can jump in easily. It uses LuaJIT on the desktop (but not on mobile), so you can hook it up to other C libraries easily.

3 Likes

I know I go on and on about AXMA but this is why - multiple panes. If you know CSS you can make “panes” in Twine (actually not in Twine but styling Twine…)

I use AXMA Story Maker 6.1 which is not the most recent version, and you pick the layout when you create a new game. Colors and fonts and borders and a background can be also configured somewhat in the IDE and there are a few default themes. When you create a game, there are three (actually four) choices which configure the layout automatically.

Screenshots of 6.1

“Interactive Fiction” is what I usually use, which gives a big main text window, A smaller image pane, and a slightly larger menu pane of links that are all directly affected in code.
21


“Classic Quest or RPG” gives you a much bigger image window, a smaller text window below, and a really big link menu. The reason for this is AXMA has built-in sprite support (I have never used it) which would let you layer and move and CSS-style images around in the main picture for a big world map, a game board, or probably most simply a room image where you could have a picture of an item that goes away when picked up.

“CYOA Book” actually gives one text pane, forces the menu to the bottom (as it also does automatically when played on a small screen) and brings up occasional images full screen that can be dismissed, then recalled with a button on the lower left.

I’m not sure what “interactive audiobook” does, the Russian devs had a website for it in the past but it didn’t catch on.

I don’t know JS, but if you do, the new AXMA-JS does a whole lot more (I’m waiting for them to translate the manual to English before I even try to deal with the JS). It also has a “Interactive Novel” template which is the main background image with “typewriter scrolling” text and links and overlay menus (think visual novel), and presents choices in a pop-out menu form. Here’s the default Interactive Novel in JS showing how they put a unicorn on screen.

AXMA is also sound and music friendly with both “play this track and repeat” background music where the mp3 files are pulled from a folder, and also short interface sounds can be uploaded directly from the IDE into the program code and called wherever on top of the music.

6.1 uses a really old-school Twine type code that looks like this:

AXMA code

JS - https://axma.info/en/
6.1 - https://sm.axmasoft.com

6.1 and JS both have an “online” version you can experiment with without downloading. I actually paid for a premium account (about $20USD) which lets me export to HTML directly. You can essentially use it for free, but you must upload works to their library and then download the HTML in that case.

(Caveat: 6.1 has a few odd quirks and behaviors that I have learned to work around, live with, and exploit to my advantage since I know it. JS may have some of these but is the most updated version and may have worked some of these issues out.)

3 Likes

Using Inform to make text adventure with visual panes (Gateway came out in '92-- why can’t we make stuff like that easily any more?)

That’s certainly possible using Inform and Glulx as is, but it’s probably not going to be particularly easy. But then if you consider using a general-purpose programming language, nothing is easy, as there isn’t anything like the pre-existing framework of useful stuff that you get with Inform, TADS, etc. If you want to improve your programming skills, though, you have to take on stuff that isn’t easy, and muddle through. It’s what all programmers do! :slight_smile:

3 Likes

Twine gets unwieldy fast if you write a big and/or complex story. Definitely do separate files for each chapter. Or use different programs for mapping/writing. I usually use draw.io (free and easy, but with pretty colours and shapes and such) to map, and a less graphic program to write.

2 Likes

How do you get a character to transfer into the next chapter? With the save-game function in Twine it seems perfect for big games?

Twine is awkward from an authoring perspective with big projects, as the IDE where you write the game gets really slow if you add hundreds of passages.

Well that sucks. As I was hoping to adapt a book into an Interactive Adventure.

Ooh, I hope someone here knows :slight_smile: I know it’s been done eg with the new Lifeline Universe games by Three Minute Games but I don’t know how.

AXMA currently informs me I have 1162 passages in my WIP. Writing is no problem. The only place it’s slow is during compile - either to run in the IDE or to export to an HTML, although the HTML actually loads pretty quickly! I think it’s error-checking in that case because it will stop if I’ve done anything wrong. It sometimes takes about a minute or two to compile to a game.

The alternate for Twine I guess would be Twee in a text editor, but that might be just as unwieldy in an extremely large game.

ChoiceScript, or more specifically Choice of Games has functionality to transfer choices and variables to the next game in a series, but it’s an internal mechanism so only works if you host a game with them.