choicescript
choicescript copied to clipboard
Add a "going back" page-curl transition style
I played a ChoiceScript game with an IF meetup group today, and I noticed something a little odd. When you click on the button to "Show Stats", a nifty little animation plays where the story flies off to the left:
But then, when you click on the button to go back to the game, the story comes back in from the right side of the screen:
"Huh," I thought to myself, "that's strange. The camera moved to the right, and we arrived at the stats screen, and then the camera moved further to the right, and we were back to where we were previously. Does this game operate in some kind of cylindrical universe, like PAC-MAN? Am I remembering wrong—no, the story definitely exited stage left; it must've crossed backstage, but we were only on the stats screen for a few seconds..." And I was so engrossed in this line of questioning that I forgot it was my turn to say what choice to make next.
This PR, then, helps future players avoid getting distracted by making the story come back in from the left instead:
This new "back curl style" happens when you close the stats screen, close the menu, or restart the game. I've also added a *next_curl_goes_back
command that authors can add to use this transition. (For example, it could be used when a player responds "No" to an "Are you sure?" choice.)
Nice! I also find the wrap-around thing disconcerting. If the page swipes to the left, it should come back from the left. I've pulled this into my fork, but I noticed it only works for Stats and Settings, not Achievements. (Maybe the game you played didn't have achievements, so the button wasn't there?)
@Gantron1
I've pulled this into my fork, but I noticed it only works for Stats and Settings, not Achievements. (Maybe the game you played didn't have achievements, so the button wasn't there?)
Guilty as charged! (I think the game we played at the meetup did actually have achievements, but I forgot about that screen since it isn't shown for the example game included in the repository.) I've updated my PR to also use the back-curl animation when going back from the Achievements screen.
Looks good! I hope this gets mainstreamed. I'm gonna have fun with *next_curl_goes_back
too. :)