Another unrelated question.
I am trying to add a pre-test and post-test to my game. Is there a way to block the user from playing the game until they have completed the pre-test?
PS: I am planning on using another webpage containing multiple choice questions for my pretest.
Another unrelated question.
The easy solution is to just have the link to the game at the end of the test. The second easiest is to have the game ask for a password at the start and give the password when the player has completed the test. Something like this:
Password accepted is a truth state that varies. Password accepted is false. When play begins: say "Please give the password." After reading a command when password accepted is false: if the player's command matches "swordfish": say "Password correct!"; now password accepted is true; otherwise: say "Incorrect password, please complete the pre-test to get the password."; reject the player's command.
This was really helpful. Thanks so much.
Do we now have access to game transcripts in vorple?
Also, is there an instance id associated with a particular instance of a game/story? As in, when a user attempts playing a game, is there a game session id that is created, which differentiates this attempt from the other attempts of the user at this game? If yes, how to access this value?
Transcripts are not yet supported. What happens when the player tries starting a transcript is described in this issue on Github.
when play begins rule, or a
Vorple interface setup rule depending whether you want one unique ID per page reload instead of play.
So if I use a rule in “when play begins”, to generate an ID for that instance of the game, would it work even if a player saves and restores the game later. As in, in case the user restores a previously saved game, would the game still have the same ID?
Also, where is the game saved when a user saves a game?
If you store the ID in a Inform variable, then yes, restoring a game will also restore the game’s ID. Something like the following; I haven’t tested but it should show the basic idea.
Obviously, if you only need the ID on the story’s side, then you don’t need JS, you could do it in Inform.
Saved games are stored in indexed DB (data stored in a local database). You can see where by using the developer tools of your browser. If I recall correctly, it’s in the entry
[checksum] is a unique ID based on your story file.
In some initial testing, it seems using “hide the prompt” in “When play begins”, and then using Vorple hyperlinks “without showing the command” works fine in this manner. Is it feasible to handle a whole game this way and never unhide the prompt, or is there some technical downside to doing so?
Yes, that should work just fine. The documentation just tries to say that unless there’s something set up to continue the game instead of player typing commands on the parser, there’s no way for Inform to unhide the prompt on its own. But if you use only hyperlinks and want to disable the prompt completely then it’s not a problem.
A question about Vorple.
I am running a sort of ARG that focuses around an Interactive Fiction on my website. However, the players are bypassing a lot by simply downloading the zblorb file, reverse engineering it, and then just reading descriptions of things, and seeing if anything has changed. The game gets updated live on the website through an automated build process I set up.
However, I am trying to prevent my players from cracking the zblorb file. I wanted to move it to the server side, but that would mean I can’t use vorple, which is great. I was thinking of trying to create a layer inside vorple or parchment to relay the message to the server for me, but not sure if that is possible or where in the code I might look.
Thoughts or suggestions greatly appreciated!
There aren’t any bulletproof ways to prevent people from digging up the story text, apart from having everything come from the server. Here’s a couple of ideas to make it at least harder:
- You can use Ajax to fetch text snippets from the server. You can look at the Scrambled Eggs and The Sum of Human Knowledge examples in the main Inform 7 extension or in Inform 6 examples directory, and combine fetching the data in the latter with replacing story content in the former (create an empty element, fetch the text from the server, fill the element with the text.)
- Take advantage of the fact that while it’s easy to extract text from the story file, it’s hard to extract and follow game logic. You could scramble or encrypt the text and unscramble/decrypt it for printing. If you use some obscure scrambling mechanism, it would be hard (but not impossible) to figure out how to reverse it based on just seeing the scrambled text.
- Add “decoy” content: Inform doesn’t do dead code elimination so anything that’s in the source text shows up in the text extracted from the story file, even if it’s never used anywhere. There’s no other downside than a small increase in the filesize. For example, if the important information is “the treasure is in the sunken pirate ship”, add a bunch of:
To say decoy1: say "The treasure is in the abandoned church." To say decoy2: say "The treasure is in the bank vault." To say decoy3: say "The treasure is under the kitchen floorboards." ....
- Same as above, but run the whole story text through a Markov generator (e.g. https://www.dcode.fr/markov-chain-text), maybe mixed together with some unrelated but similar text body, and copy-paste the results as “to say” definitions (or routines in I6) to random places in the source text. If there’s enough text it would be hard to tell which parts are real and what’s just nonsense.