Library

Sunday, April 2, 2017

Beta testers, do your worst!

Whenever I release a new script, I always want my testers to do their best to find what doesn't work or what works, but could be better. That said, I think I'm finally at a stopping point for my Twine 2 project, "Who did it in the Woods?" narrative game. I named it "Woods", since it's good practice for uploading to github and other Twine sharing platforms like philome (I am pending sharing there after I get your beta feedback) to keep project titles simple, without spaces and illegal characters (like (, /, % to name a few). I'm sending my project to various non-Twine users in my developer circles, keeping in mind the intended audience is 8-10 year olds! Poking around playing various Twine games, I have to say there are a lot of fantasy themed tales, that for my taste, are too long and/or circular that honestly didn't keep my attention. "Woods" is short, and "open" ends, leaving the possibility to serialize? Tho, I am no J.K Rowlings, believe me ;) In it, you'll find multiple ways to define and call variables, and ever the animation programmer, I taught myself a new scripting snippet that I also added to github and the wiki, "Timer". I found it researching the Twine forum here, and the simple snippet is this:

(set: $counter to 1)
|amount>[$counter]!

{(live: 1s)[
(set: $counter to it + 1)
(if: $counter is 11)[(go-to: "PlanB")]
(replace: ?amount)[$counter]
]
}

In this case, when 11 seconds has passed, the (go-to:) macro automatically moves you to a passage named PlanB (that I manually created by clicking on the +passage button). I also used a timer this way to make the critters "talk":


(set: $counter to 1)

{(live: 1s)[
(set: $counter to it + 1)
(if: $counter is 2)[All 3 sat and watched the trickle from the new culvert after the passing thunderstorm.]
(if: $counter is 3)[All 3 sat and watched the trickle from the new culvert after the passing thunderstorm.]
(if: $counter is 4)[All 3 sat and watched the trickle from the new culvert after the passing thunderstorm.]
(if: $counter is 5)[All 3 sat and watched the trickle from the new culvert after the passing thunderstorm.]
(if: $counter is 6)[All 3 sat and watched the trickle from the new culvert after the passing thunderstorm.]

(if: $counter is 7)["Gettin' dark"]
(if: $counter is 8)["No...it's not getting dark Squorkie"]
(if: $counter is 9)["No...it's not getting dark Squorkie"]
(if: $counter is 10)[(go-to: "Chat")]
(replace: ?amount)[$counter]
]}

So, you get a lot of options from this simple snippet! By setting the if statements sequentially by order of $counter value, you can control how long your text displays. You can also make it "blink" by skipping values (instead of in order as 2, 3, 4, 5, 6 in my example above, you could have just scripted this order 2, 4, 6 and then the text would appear and disappear, appear, disappear, etc).

There's also a way to control when/how long hooks (aka links) appear on a passage that I plan to test and create a new snippet for future use. I'll add my findings in my next post, any maybe even use to update "Woods".

Let me know what you think! And, I'll post feedback to let you know what changes I make before I publish on philome and prepare to share with the official Twine group via Twitter and on their user forum.

No comments:

Post a Comment

sepinventors@gmail.com

My photo
Charlottesville, VA, United States
I'm a freelance ed tech consultant involved with learning labs throughout the Charlottesville area. M.Ed with 10+ yrs programming experience in private industry, loving reconnecting to the fun teaching animation programming.