<center><h1>Game Over</h1><br>Hope you learned something.</center>
<<nobr>><<set $story to {title:"A Conversation About Tricking The Twine Word Counter",intro:"This is a short game that is written in less than 15 passages and, according to Twines word counter, less than 1000 words.<br><br>It also serves to demonstrate the conversation macro that I'm working on.<br><br>"}>><<set $convo to {start:{text:"You seem to be having a conversation with a disembodied voice. Friendly enough though.",visited:0,options:[{choice:"'So what's this about tricking the word counter?'",next:"tricking"}],},tricking:{text:"'Yes, tricking. It's pretty dumb and there are some simple workarounds that'll let you get a lot of words in that it thinks are only one.'",visited:0,options:[{choice:"'Could you tell me one of them?'",next:"whichone"} ],},whichone:{text:"'Which one of them would you like to know about?'",visited:0,options:[{choice:"'#x20'",goto:"Chatter",next:"x20",hideif:"x20"},{choice:"'linebreaks'",goto:"Chatter",next:"linebreaks",hideif:"linebreaks"},{choice:"'br'",goto:"Chatter",next:"br",hideif:"br"},{choice:"'javascript objects'",next:"javascript",hideif:"javascript"},{choice:"'code readability'",next:"code",hideif:"code"},{choice:"'What was that about a conversation system?'",next:"convo1",showif:"code"}],},x20:{text:"'Twine outputs html - within the html you can use an &#x20; symbol instead of a space. This is good because the word counter doesn't reognize it, so it considers two words separated by the #x20 to be a single word. This means you can turn all of your display text in a passage into a single word.'",visited:0,options:[{choice:"Back",next:"whichone"}],},linebreaks:{text:"'The word counter considers a newline character to be a word break. If you put all of your code on a single line, you reduce the number of words because it will see the instruction end and start arrows as a single word, whereas it would count them as 2 if they were separated by a newline.'",visited:0,options: [ {choice:"Back",next:"whichone"}],},br:{text:"'The html br instruction generates a linebreak. Now the word counter normally counts a word break if you use a linefeed to separate two words. Put the on the same line with an <br> inbetween them and it'll just count them as a single word.'",visited:0,options:[{choice:"Back",next:"whichone"}],},javascript:{text:"'Javascript objects are good because they separate values with colons, commas and brackets - and the word counter doesn't consider any of them to be whitespace, so if you stuff a javascript object full of text using #x20s for spaces, you can have as many words as you want and it'll only count as a single word (plus 3 for the set instrution).'",visited: 0,options:[ {choice:"Back",next:"whichone"}],},code:{text:"'Ah, you've spotted the problem - once you've done all these things to the source of your twine it's becomes prety much impossible to read - which makes debugging, fixing or extending it somewhat problematic. You can get around this, however, by storing a well written version of your data outside of twine and then using an editor like gvim to convert it into a white space free version.'",visited:0,options:[{choice:"Back",next:"whichone"}],},convo1:{text:"'Ah, yes, that little thing. Something to help when you want to save on nodes. It's lets you put a little structured conversation like this one in a single node.'",visited:0,options:[{choice:"'So how does it work?'",next:"convo2"}],},convo2:{text:"'Well, you take a javascript object and you deine a bunch of conversaion nodes inside it. Each needs a name, some text to display and an array of at least one option for the user to pick. For each option you need to give the choice to be displayed for you to click on and the next conversation node to link to. You can also use a goto: property to exit the covnersation and jump to another passage or showif:node or hideif:node directives to conditionally display choices.'",visited:0,options:[{choice:"'Vanish?'",next:"convo3"}],},convo3:{text:"'Yeah, vanish. If you return to the conversation node the option won't be presented a second time. Did you notice the way the different cheat options dissapeared after you asked about them?.'",visited:0,options:[{choice:"'Yep. That was cool.'",next:"convo5"},{choice:"'Nope, can't say I did.'",next:"convo4"}],},convo4:{text:"'Well, go and have a look now...'",visited:0,options:[{choice:"'Ok'",next:"whichone"},{choice:"'That's ok, I can use my imagination.'",next:"exit"}],},convo5:{text:"'It's designed to let you imbed short, fairly simple conversations into a node.'",visited:0,options:[{choice:"'Cool'",next:"exit"},{choice:"'That's lame, dude.'",next:"exit"}],},exit:{text:"You feel the presence depart.",visited: 0,options:[{choice:"Continue",goto:"End",next:"END"}],},}>><<set $location to "start">><<endnobr>>
<<nobr>><<if $oldlocation neq 0>><<set $convo[$oldlocation].options[$picked].visited to 1>><<endif>><<print $convo[$location].text>><br><br><<set $oldlocation to $location>><<set $convo[$location].visited to 1>><<set $options to $convo[$location].options>><<if $options.length gt 0>><<set $opt0 to $options[0]>><<set $show to 1>><<set $check to $opt0.showif>><<if $check neq 0 and $convo[$check].visited is 0>><<set $show to 0>><<endif>><<set $check to $opt0.hideif>><<if $check neq 0 and $convo[$check].visited is 1>><<set $show to 0>><<endif>><<if $show is 1>><<set $link0 to $opt0.goto>><<if $link0 is 0>><<set $link0 to $self>><<endif>>[[<<$opt0.choice>><br>|$link0][$picked to 0;$location to $opt0.next]]<<endif>><<endif>><<if $options.length gt 1>><<set $opt1 to $options[1]>><<set $show to 1>><<set $check to $opt1.showif>><<if $check neq 0 and $convo[$check].visited is 0>><<set $show to 0>><<endif>><<set $check to $opt1.hideif>><<if $check neq 0 and $convo[$check].visited is 1>><<set $show to 0>><<endif>><<if $show is 1>><<set $link1 to $opt1.goto>><<if $link1 is 0>><<set $link1 to $self>><<endif>>[[<<$opt1.choice>><br>|$link1][$picked to 1;$location to $opt1.next]]<<endif>><<endif>><<if $options.length gt 2>><<set $opt2 to $options[2]>><<set $show to 1>><<set $check to $opt2.showif>><<if $check neq 0 and $convo[$check].visited is 0>><<set $show to 0>><<endif>><<set $check to $opt2.hideif>><<if $check neq 0 and $convo[$check].visited is 1>><<set $show to 0>><<endif>><<if $show is 1>><<set $link2 to $opt2.goto>><<if $link2 is 0>><<set $link2 to $self>><<endif>>[[<<$opt2.choice>><br>|$link2][$picked to 2;$location to $opt2.next]]<<endif>><<endif>><<if $options.length gt 3>><<set $opt3 to $options[3]>><<set $show to 1>><<set $check to $opt3.showif>><<if $check neq 0 and $convo[$check].visited is 0>><<set $show to 0>><<endif>><<set $check to $opt3.hideif>><<if $check neq 0 and $convo[$check].visited is 1>><<set $show to 0>><<endif>><<if $show is 1>><<set $link3 to $opt3.goto>><<if $link3 is 0>><<set $link3 to $self>><<endif>>[[<<$opt3.choice>><br>|$link3][$picked to 3;$location to $opt3.next]]<<endif>><<endif>><<if $options.length gt 4>><<set $opt4 to $options[4]>><<set $show to 1>><<set $check to $opt4.showif>><<if $check neq 0 and $convo[$check].visited is 0>><<set $show to 0>><<endif>><<set $check to $opt4.hideif>><<if $check neq 0 and $convo[$check].visited is 1>><<set $show to 0>><<endif>><<if $show is 1>><<set $link4 to $opt4.goto>><<if $link4 is 0>><<set $link4 to $self>><<endif>>[[<<$opt4.choice>><br>|$link4][$picked to 4;$location to $opt4.next]]<<endif>><<endif>><<if $options.length gt 5>><<set $opt5 to $options[5]>><<set $show to 1>><<set $check to $opt5.showif>><<if $check neq 0 and $convo[$check].visited is 0>><<set $show to 0>><<endif>><<set $check to $opt5.hideif>><<if $check neq 0 and $convo[$check].visited is 1>><<set $show to 0>><<endif>><<if $show is 1>><<set $link5 to $opt5.goto>><<if $link5 is 0>><<set $link5 to $self>><<endif>>[[<<$opt5.choice>><br>|$link5][$picked to 5;$location to $opt5.next]]<<endif>><<endif>><<if $options.length gt 6>><<set $opt6 to $options[6]>><<set $show to 1>><<set $check to $opt6.showif>><<if $check neq 0 and $convo[$check].visited is 0>><<set $show to 0>><<endif>><<set $check to $opt6.hideif>><<if $check neq 0 and $convo[$check].visited is 1>><<set $show to 0>><<endif>><<if $show is 1>><<set $link6 to $opt6.goto>><<if $link6 is 0>><<set $link6 to $self>><<endif>>[[<<$opt6.choice>><br>|$link6][$picked to 6;$location to $opt6.next]]<<endif>><<endif>><<if $options.length gt 7>><<set $opt7 to $options[7]>><<set $show to 1>><<set $check to $opt7.showif>><<if $check neq 0 and $convo[$check].visited is 0>><<set $show to 0>><<endif>><<set $check to $opt7.hideif>><<if $check neq 0 and $convo[$check].visited is 1>><<set $show to 0>><<endif>><<if $show is 1>><<set $link7 to $opt7.goto>><<if $link7 is 0>><<set $link7 to $self>><<endif>>[[<<$opt7.choice>><br>|$link7][$picked to 7;$location to $opt7.next]]<<endif>><<endif>><<if $options.length gt 8>><<set $opt8 to $options[8]>><<set $show to 1>><<set $check to $opt8.showif>><<if $check neq 0 and $convo[$check].visited is 0>><<set $show to 0>><<endif>><<set $check to $opt8.hideif>><<if $check neq 0 and $convo[$check].visited is 1>><<set $show to 0>><<endif>><<if $show is 1>><<set $link8 to $opt8.goto>><<if $link8 is 0>><<set $link8 to $self>><<endif>>[[<<$opt8.choice>><br>|$link8][$picked to 8;$location to $opt8.next]]<<endif>><<endif>><<if $options.length gt 9>><<set $opt9 to $options[9]>><<set $show to 1>><<set $check to $opt9.showif>><<if $check neq 0 and $convo[$check].visited is 0>><<set $show to 0>><<endif>><<set $check to $opt9.hideif>><<if $check neq 0 and $convo[$check].visited is 1>><<set $show to 0>><<endif>><<if $show is 1>><<set $link9 to $opt9.goto>><<if $link9 is 0>><<set $link9 to $self>><<endif>>[[<<$opt9.choice>><br>|$link9][$picked to 9;$location to $opt9.next]]<<endif>><<endif>><<endnobr>>
<<setup>><<$story.intro>>[[Continue|Chatter]]
<<$story.title>>
Mykael
<<set $self to passage()>><<converse>>