W3C home > Mailing lists > Public > public-html-diffs@w3.org > October 2011

hixie: Add an example of the script of a conversation in interactive fiction. (whatwg r6685)

From: poot <cvsmail@w3.org>
Date: Fri, 14 Oct 2011 17:38:57 -0400
To: public-html-diffs@w3.org
Message-Id: <E1REpSy-0003Bj-Uk@jay.w3.org>
hixie: Add an example of the script of a conversation in interactive
fiction. (whatwg r6685)


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 @@
 &lt;p&gt; &lt;time&gt;14:24&lt;/time&gt; &lt;b&gt;kaj&lt;/b&gt; 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>&lt;p&gt; Next, you meet a fisherman. You can say one of several greetings:
+ &lt;dt&gt; "Hello there!"
+ &lt;dd&gt;
+  &lt;p&gt; He responds with "Hello, how may I help you?"; you can respond with:
+  &lt;dl&gt;
+   &lt;dt&gt; "I would like to buy a fish."
+   &lt;dd&gt; &lt;p&gt; He sells you a fish and the conversation finishes.
+   &lt;dt&gt; "Can I borrow your boat?"
+   &lt;dd&gt;
+    &lt;p&gt; He is surprised and asks "What are you offering in return?".
+    &lt;dl&gt;
+     &lt;dt&gt; "Five gold." (if you have enough)
+     &lt;dt&gt; "Ten gold." (if you have enough)
+     &lt;dt&gt; "Fifteen gold." (if you have enough)
+     &lt;dd&gt; &lt;p&gt; He lends you his boat. The conversation ends.
+     &lt;dt&gt; "A fish." (if you have one)
+     &lt;dt&gt; "A newspaper." (if you have one)
+     &lt;dt&gt; "A pebble." (if you have one)
+     &lt;dd&gt; &lt;p&gt; "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.
+    &lt;/dl&gt;
+   &lt;/dd&gt;
+  &lt;/dl&gt;
+ &lt;/dd&gt;
+ &lt;dt&gt; "Vote for me in the next election!"
+ &lt;dd&gt; &lt;p&gt; He turns away. The conversation finishes.
+ &lt;dt&gt; "Sir, are you aware that your fish are running away?"
+ &lt;dd&gt;
+  &lt;p&gt; He looks at you skeptically and says "Fish cannot run, sir".
+  &lt;dl&gt;
+   &lt;dt&gt; "You got me!"
+   &lt;dd&gt; &lt;p&gt; The fisherman sighs and the conversation ends.
+   &lt;dt&gt; "Only kidding."
+   &lt;dd&gt; &lt;p&gt; "Good one!" he retorts. Your conversation options at this
+   point are the same as those following "Hello there!" above.
+   &lt;dt&gt; "Oh, then what are they doing?"
+   &lt;dd&gt; &lt;p&gt; He looks at his fish, giving you an opportunity to steal
+   his boat, which you do. The conversation ends.
+  &lt;/dl&gt;
+ &lt;/dd&gt;
   </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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:09:20 UTC