I would like to be able to put a restriction or limit the number of times someone accesses one of my games. It may be this needs to be done on the actual website rather than within the game, but is there any way you can use code on certain paragraphs that would someone restrict access once a person has played say, five times?
There may be a number of ways to do this, but I am very new to this so any ideas or suggestions are welcome.
It may be that they need to enter an email address at the beginning (another answer required on how to do that!) or that it someone registers the local machine IP.
Any suggestions gratefully received. Twine 2.1 Mac OS.
Many thanks
Comments
In my opinion the simple answer is No, at least not without seriously changing the story (engine) to rely on information continually supplied from a (web) server.
A story HTML file is a self contained web-application (excluding any hosted media files), this means that the end-user has total access to the code of your story as well as the media files it uses, which in turn means they can by pass any non-advance method used to restrict access.
The following are two of the possible advance techniques you can use to try to get around this issue:
1. Change the story (engine) to require ongoing information for a server to work.
On possible example of this would would be to store the passage meta data on the server and modify the story to request that meta data on an as needed bases, although this option is not trivial to implement.
2. Convert your story HTML file into an Executable based application and modify it to require information obtain from a server to work, again this in not a trivial process.