Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a "going back" page-curl transition style #131

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cartr
Copy link

@cartr cartr commented Mar 3, 2019

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:

The story flying 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:

The story coming in from the right

"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:

fancynew

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.)

@Gantron1
Copy link

Gantron1 commented Mar 3, 2019

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?)

@cartr
Copy link
Author

cartr commented Mar 3, 2019

@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.

@Gantron1
Copy link

Gantron1 commented Mar 3, 2019

Looks good! I hope this gets mainstreamed. I'm gonna have fun with *next_curl_goes_back too. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants