Login
Remember
IF Answers
Ask a Question

# 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?

- inform7

## 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.

## Related questions

- What's the best way to test whether or not scoring is being used? (Inform 7)
- With Flexible Windows by Jon Ingold, is there a way to make the text display at the top of the window, even in Gargoyle? (Inform 7)
- Is there a way to reduce the right margin for a play-in-browser website released by Inform 7?
- Is there an easy way to loop text in Inform 7?
- Is there an easy way to port Inform 6 code (unfinished game) into Inform 7 to continue development?

...