In Inform 7, is there a way to detect which interpreter is being used?

+5 votes
73 views
asked Mar 24 in Authoring by bg (692 points)
recategorized Mar 27 by Alex
To be more specific--is there a simple/straightforward way to detect whether the game is running in Gargoyle?

1 Answer

+2 votes
answered Mar 25 by AndrewS (250 points)
selected Mar 25 by bg
 
Best answer

The extension Interpreter Sniffing by Friends of I7 seems to do this, sort of. I haven't compiled it, but I recognize Friends of I7 and some of the names in the extension. So if it doesn't work, they can know about it.

This isn't quite a one-line fix, since you have to add an extension and then put in one line, but I think it is pretty good. I'd assume that, if a new interpreter is created, Glulx itself would have no way to know this.

commented Mar 25 by Dannii (329 points)
The extension doesn't support Gargoyle directly at the moment (we have some extra code in Kerkerkruip which does, but it won't work for other games) but it probably would be possible. If/when we update it I'll try to remember to post an update here too.
This site is now closed.
As of 1st November 2015, this site is a read-only archive. For more information see the intfiction forum post

Welcome to IF Answers, a site for questions and answers about Interactive Fiction.

Technical questions about interactive fiction development tools such as Inform, Twine, Quest, QuestKit, Squiffy, Adrift, TADS etc. are all on-topic here.

Non-technical questions about interactive fiction are also on-topic. These questions could be about general IF design, specific games, entering the IF Comp etc.
...