- From: poot <cvsmail@w3.org>
- Date: Fri, 14 Oct 2011 17:38:57 -0400
- To: public-html-diffs@w3.org
hixie: Add an example of the script of a conversation in interactive fiction. (whatwg r6685) http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.5361&r2=1.5362&f=h http://html5.org/tools/web-apps-tracker?from=6684&to=6685 =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.5361 retrieving revision 1.5362 diff -u -d -r1.5361 -r1.5362 --- Overview.html 14 Oct 2011 19:09:36 -0000 1.5361 +++ Overview.html 14 Oct 2011 21:38:36 -0000 1.5362 @@ -42985,6 +42985,60 @@ <p> <time>14:24</time> <b>kaj</b> you are not helping your case</pre> + </div><div class="example"> + + <p>HTML does not have a good way to mark up graphs, so descriptions + of interactive conversations from games are more difficult to mark + up. This example shows one possible convention using + <code><a href="#the-dl-element">dl</a></code> elements to list the possible responses at each + point in the conversation. Another option to consider is describing + the conversation in the form of a DOT file, and outputting the + result as an SVG image to place in the document. <a href="#refsDOT">[DOT]</a></p> + + <pre><p> Next, you meet a fisherman. You can say one of several greetings: +<dl> + <dt> "Hello there!" + <dd> + <p> He responds with "Hello, how may I help you?"; you can respond with: + <dl> + <dt> "I would like to buy a fish." + <dd> <p> He sells you a fish and the conversation finishes. + <dt> "Can I borrow your boat?" + <dd> + <p> He is surprised and asks "What are you offering in return?". + <dl> + <dt> "Five gold." (if you have enough) + <dt> "Ten gold." (if you have enough) + <dt> "Fifteen gold." (if you have enough) + <dd> <p> He lends you his boat. The conversation ends. + <dt> "A fish." (if you have one) + <dt> "A newspaper." (if you have one) + <dt> "A pebble." (if you have one) + <dd> <p> "No thanks", he replies. Your conversation options + at this point are the same as they were after asking to borrow + his boat, minus any options you've suggested before. + </dl> + </dd> + </dl> + </dd> + <dt> "Vote for me in the next election!" + <dd> <p> He turns away. The conversation finishes. + <dt> "Sir, are you aware that your fish are running away?" + <dd> + <p> He looks at you skeptically and says "Fish cannot run, sir". + <dl> + <dt> "You got me!" + <dd> <p> The fisherman sighs and the conversation ends. + <dt> "Only kidding." + <dd> <p> "Good one!" he retorts. Your conversation options at this + point are the same as those following "Hello there!" above. + <dt> "Oh, then what are they doing?" + <dd> <p> He looks at his fish, giving you an opportunity to steal + his boat, which you do. The conversation ends. + </dl> + </dd> +</ul></pre> + </div><h4 id="footnotes"><span class="secno">4.13.5 </span>Footnotes</h4><p>HTML does not have a dedicated mechanism for marking up footnotes. Here are the recommended alternatives.<hr><p>For short inline annotations, the <code title="attr-title"><a href="#the-title-attribute">title</a></code> attribute should be used.<div class="example"> @@ -72491,6 +72545,9 @@ <dt id="refsDOMRANGE">[DOMRANGE]</dt> <dd><cite><a href="http://html5.org/specs/dom-range.html">DOM Range</a></cite>, A. Gregor, Ms2ger. html5.org.</dd> + <dt id="refsDOT">[DOT]</dt> + <dd>(Non-normative) <cite><a href="http://www.graphviz.org/content/dot-language">The DOT Language</a></cite>. Graphviz.</dd> + <dt id="refsECMA262">[ECMA262]</dt> <dd><cite><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">ECMAScript Language Specification</a></cite>. ECMA.</dd>
Received on Friday, 14 October 2011 21:39:02 UTC