Last active
April 28, 2024 14:14
-
-
Save KalleMacD/9b78be94d77a5e56883f to your computer and use it in GitHub Desktop.
How to make a Twine game into an iOS web-app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This quick guide will show you how add an optional web-app (iOS) view to your Twine game! | |
//First you'll need to open up your Twine (.tws) file. | |
1. Add a new passage to your story and name it "script" | |
2. Enter the tags section and add the word "script" | |
3. Now, in the main body, add the code: | |
document.addEventListener('touchmove', function(e) { | |
e.preventDefault(); | |
}, false); | |
//Next you'll have to add some code to the .html file. | |
1. Save your Twine story. | |
2. Go to the "Build" option in the top bar. | |
3. Click "Build Story" | |
4. Exit Twine and open (with notepad++ or any html editor, really) the built story .html file that you just made. | |
5. Add these two meta tags somewhere into the code: | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="viewport" content="width=device-width; initial-scale=1.0; user-scalable=no;"> | |
//That's it! Your game should now run in a web-app mode on iOS devices! Prompt users to click the share button and hit "Add to Home Screen". This will "install" your Twine game on their system! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is very helpful, thank you!