Is there a manual somewhere for Glulx? I’d like to use timers, but can’t find documentation about them in the Inform7 manuals. The Glulx Entry Points says that it allows the author to set responses to Timer events, but doesn’t give syntax or examples for doing so.
(I tried using Basic Real Time by Sarah Morayati, but her example code isn’t compiling).
Glulx manual is
eblong.com/zarf/glulx/glulx-spec.html I presume. I don’t know much about timers though.
Timers aren’t handled by the Glulx VM but by the Glk library. You will want
the Glk specification if you are going to do any Glk hacking. But like you say, there are already extensions for this kind of thing. If you tell us which version of Sarah’s extension you’re using, post your source, and mention the problem messages, the folks here can probably tell you how to get things working.
I seem to have what I need by using the code from this post :
But I am curious as to why Basic Real Time isn’t working for me. The build of Inform 7 I’m using is “Inform (1.2 6.31/6H98).” I have Basic Real Time version 2 installed.
When I run the “Green Button” example code that comes with the extension, I get a compiler error that states:
Problem. You wrote ‘It can be pressed or unpressed’ : but it’s often a little ambiguous to declare properties for ‘it’, so it seems best to spell this out by saying exactly what the property’s owner or owners would be.
Problem. The sentence ‘It is unpressed’ appears to say two things are the same - I am reading ‘It’ and ‘unpressed’ as two different things, and therefore it makes no sense to say that one is the other: it would be like saying that ‘the hawk is the handsaw’. It would be all right if the second thing were the name of a kind, perhaps with properties: for instance ‘Elsinore is a lighted room’ says that something called Elsinore exists and that it is a ‘room’, which is a kind I know about, combined with a property called ‘lighted’ which I also know about.
I changed “It can be pressed or unpressed.” to “The button can be pressed or unpressed.” Which seems to solve that problem, but then I get this compiler error:
This is the report produced by Inform 7 (build 6G60) on its most recent run through:
Problem. In the sentence ‘now the next action is the action of releasing the terrors’ , I was expecting to read a condition, but instead found some text that I couldn’t understand - ‘next action is the action of releasing the terrors’.
I was trying to match this phrase:
now (next action is the action of releasing the terrors - a condition)
This was what I found out:
next action is the action of releasing the terrors = something unrecognised
I think that might be a bug in the example.
It can be that the rule this line is from should read:
When play begins:
now the next real-time action is the action of releasing the terrors;
There are other guides out there, but there is no other manual for Glulx, and that should tell you something. You may want to consider a different language, as it will be hard rowing with Glulx.