0 votes
by (120 points)
I am a medical educator trying to use Twine to construct story-based learning modules for medical trainees. Is there any way of having a game constructed in Twine collect data on usage? This data would need to be tied to specific users. Basically, I would want to track in a specific session how much time the users spend playing the game, which branching options they take, etc. Thanks in advance!

2 Answers

0 votes
by (63.1k points)
edited by
Getting usage data from Twine isn't too hard, you could collect whatever information you want and pretty easily pack it up as JSON or similar. From there though, things get a little complicated, since you'll need some way to send that data, and you'll need some sort of system in place that receives and processes that data, too. Traditionally, you would use a server and a database program of some kind for this. Even assuming you have access to a server and the ability to configure it and program it, I think that that level of programming goes quite a bit beyond the sort of help you tend to find here, and certainly goes well beyond my own abilities. If this is the approach you want and is feasible for you, I suggest looking elsewhere for those sort of technical questions, like Stack Overflow.

If that's not in your wheelhouse, you could instead have twine output the JSON data representing the student's usage information and have the students themselves send it directly to you via email or similar, and then unpack and parse that data yourself. The problem here, though, is pretty obvious. A single error in the copy/paste means a student's work could be lost, and if you have a lot of students, that could be a lot of work. You'll also likely want to encrypt this data, at least a little bit, to discourage cheating (assuming its an issue), and that makes things more error prone on the copy/paste side since it'll be harder for all parties to determine if the data is complete until you decrypt it. This is more realistically achievable assuming you can't or don't want to go the server route, though it still might not exactly be a walk in the park. If you want to try to implement something like this, let me know which story format (and version) you're using and I can write up some example code to help get you started. That said, it's not really an elegant solution.

Someone else might have a better idea if neither of these solutions are what you're looking for.
by (120 points)
Thanks for your help! I think most of the things you're describing are outside of my abilities. I'm a physician by training and have used systems like Moodle that collect data automatically. But your answer is very helpful for understanding my options.
0 votes
by (159k points)

As explained by @Chapel determining how long a Story was being read (variable combined with time tracking) and what options were selected (path of Passages in History system) are fairly trivial actions, however determining which specific user is currently viewing a copy of the Story and collecting all the relevant data you want is not.

re:  specific user
You could ask the reader to enter an identifier (like an email address) when they first start the story, but unfortunately that solution is prone to misuse. eg. multiple people could use the same identifier.

Instead I would suggest getting a professional software developer to create you a web-site which each user would have to login to, this web-site could handle both the identifying of each specific user as well as receiving the user's data from the story. If the Story is changed to include a heartbeat feature (data is sent to the server on a regular schedule) then the website could even track how long the user had the Story open.

The creation of a web-site is outside the standard scope of a standard Q/A thread.

by (120 points)
Thanks for your answer! As I commented above, I'm a physician by training, which limits my options. Creating a unique and anonymous username for research isn't that hard, but I think collecting the data might be a challenge. I don't have the funding to create another website besides the LMS (Moodle-based) I am already using, but I'm at USC so there's potential for me to have that option in the future. Thanks again!
...