Where Are You? by Quinn L
Fall 2015
Where Are You? by Quinn L
The Haunted Sleepover by Kaylee W
The Amazing Escape by Clayton L
The Mysterious Dungeon by Ross T
Bob by Kadyn S
The Scary Mansion! by Isabella F
Cheating Simulator by Travis D
Haunted House by Rachel W
The Dark Tunnel by Caleb B
My Crazy Life by Max B
The Scariest Tunnels by Damian B
Stuff and More Stuff by Weston W
The Tall House! by Mackenzie S
The Adventure in Nature by Amanda T
The Dungeon by Nate R
The Haunted Mansion by Chloe V
The Slaughter House by Jenny S
The Tall House! by Mackenzie S
Desert Adventure by Noah H
The Race by Leota L
Zombies by Andy A
Try To Escape by Eduardo A
Dungeon by Christian B
Try To Survive by Hannah B
JIF Peanut Butter Jar by Alex H
Lost and Afraid by Rachel B
Darth Vader by Tyler C
Sky Fall 2 by Garrett C
Candy Land 2.0 by Andrea F
Killer Stuffed Animals by Kelsie H
JIF Peanut Butter Jar by Alex H
Murder Mystery by Jackson K
Zombie Apocalypse by Brian K
Money Maker by Garrett M
Finding Taylor by Maci M
Taco Bell by George M
Zombie Apocalypse by Wade M
Your Worst Nightmare by Trinity P
The Creepy Hotel by Alyson Q
1738 by Blu S
Bob by Kadyn S
Hunter by Hunter S
A Text Adventure by Justin S
Zombie Apocalypse by Hunter T
To customize the way your game looks, click the menu in the bottom-left, then Edit Story Stylesheet. In the stylesheet, you can write CSS code that will allow you to change the background color, the text color, the maximum size for pictures, and much more.
If you put the code background:lightblue; in the section after body { , it changes the background to light blue. Putting the code color:darkgreen; in the section after tw-story { changes the text color to darkgreen. The code img { max-width:600px; } says to the computer, "All images (pictures, animated gifs, etc.) should be 600 pixels wide or less."
Here is some basic CSS that can be used with Harlowe, the default Twine 2 theme.
P.S.
To remove the back arrow (I recommend it for Twine games) include this code in your CSS
CONTINUE TO THE NEXT POST: Twine code, keys, and locked doors
We will start by talking about an easy way to add Sound Effects which will stop playing whenever the player moves to a new passage. After you find your YouTube video, click Share and Embed. Copy the iframe code. If you want the video hidden, change the width and height to zero. If you want the video to autoplay, add ?autoplay=1 to the end of the video URL. Keep in mind that this method will NOT allow you to add background music that plays continuously throughout the game. We will discuss how to add background music below these examples.
<iframe width="0" height="0" src="https://www.youtube.com/embed/9NcPvmk4vfo?autoplay=1"></iframe>
Here are a few Legend of Zelda sound effects and their iframe embed code.
Item:
<iframe width="0" height="0" src="https://www.youtube.com/embed/ly5C2dAUF-o?autoplay=1"></iframe>
Secret:
<iframe width="0" height="0" src="https://www.youtube.com/embed/c8YNB9zVlHE?autoplay=1"></iframe>
Game Over:
<iframe width="0" height="0" src="https://www.youtube.com/embed/3ye2TjzeX70?autoplay=1"></iframe>
To add background music that plays continuously throughout the game, first click on the menu in the bottom left and add the following code to the Story JavaScript.
if(typeof YouTubeTunes == "undefined"){
$('body').append('<div id="youtubetunes"></div>');
var YouTubeTunes = {
play: function(id){
console.log('YouTubeTunes:' + id);
if(this.current != id){
this.current = id;
var container = $('#youtubetunes');
container.empty();
container.append('<iframe src="https://youtube.googleapis.com/v/' + id +
'?autoplay=1&loop=1&playlist='+ id +
'" style="visibility:hidden;width:500px;height:500px;position:absolute;top:-1000px;left:-1000px;"></iframe>');
} else {
console.log('already playing');}},
stop: function(){
$('#youtubetunes').empty();
this.current = "";
console.log('stopped youtubetunes');}};
window.YouTubeTunes = YouTubeTunes;}
Next, add this code to the passage in which you want the music to start playing.
<div style="display:none;"><img src=";P" onerror="YouTubeTunes.play('UyxR8RNoaIQ');"></div>
Using that last code you can play the audio from any YouTube video. For example, to play the audio from https://www.youtube.com/watch?v=5lF1XV9g29k you need to replace UyxR8RNoaIQ with 5lF1XV9g29k. Like this...
<div style="display:none;"><img src=";P" onerror="YouTubeTunes.play('5lF1XV9g29k');"></div>
RECENT POSTS