Egamebook – home of the new electronic gamebookhttp://egamebook.com
Complex game worlds, simple interfaces<p>The whole point of egamebook is to allow for complex game worlds that are controlled by a series of simple choices. By simple, I don&rsquo;t mean &ldquo;easy&rdquo; or &ldquo;without complex consequences&rdquo;. I just mean they&rsquo;re not a complicated interface.<sup id="fnref1"><a href="#fn1" rel="footnote">1</a></sup> They&rsquo;re a list of 2 to 5 options to choose from.</p>
<p>More generally, I&rsquo;m interested in systems that present complex simulations<sup id="fnref2"><a href="#fn2" rel="footnote">2</a></sup> in conversational form.</p>
<p><img src="/img/p/interface.jpg" alt="The interface metaphor"></p>
<p>A good way to explain this is to imagine that you&rsquo;re playing a game through another person. Let&rsquo;s call this person <em>Interface</em>. You&rsquo;re sitting behind a curtain while <em>Interface</em> sits in front of the computer and describes to you the situation on the screen. He then gives you options.</p>
<p>If <em>Interface</em> is totally brain dead, he can give you options like &ldquo;Do you want me to click on this button?&rdquo; or &ldquo;Do you want me to move forward one step?&rdquo; Let&rsquo;s call these <em>micro-options</em>. They are the lowest level of decisions and you make them a thousand of times per hour. Brain dead <em>Interface</em> would also give you another type of options: <em>dumb options</em>. These would be things like &ldquo;Do you want to scrap the tank you just built?&rdquo; or &ldquo;Do you want to walk into the wall?&rdquo;</p>
<p>But a person with any amount of intelligence would ask differently. Such <em>Interface</em> would give you options like &ldquo;Do you want to attack from the north?&rdquo; or &ldquo;Do you want to peek into the other room?&rdquo; I call those <em>real options</em>.</p>
<p>I think we can agree we want computers to give us real options instead of micro-options or dumb options, unless those are unavoidable.</p>
<h2>How do you get to real options?</h2>
<p>This is obviously the hard part. In traditional gamebooks and interactive fiction, there is almost no simulation, so these options are put there by the authors (i.e. humans). But if you want a more open ended world, what do you do?</p>
<p>The answer is: Artificial Intelligence (AI).</p>
<p>This is again best explained with a game. In games, AI is generally written for the enemies. Some games have allies or wingmen, and those also need AI. In other words, AI is written for all agents in the game <em>except for the player</em>. </p>
<p>But that&rsquo;s exactly what you want. You want to write your AI in a way that it can be applied to the player. Or, more precisely, to the User Interface (UI).</p>
<p><a href="http://egamebook.com/lochness/"><img alt="Loch Ness screenshot" src="/img/p/lochness.jpg" style="max-width: 40%; float: right; margin-left: 1em; margin-bottom: 1em;" /></a></p>
<p>This is what I tried to do this past weekend when I entered the Ludum Dare #33 competition. (It&rsquo;s a challenge to create a game in one weekend from scratch, solo.) I used the (still very much incomplete) egamebook library as the engine, and my fuzzy logic library as the basis of the AI. I made a little prototype called <em><a href="http://egamebook.com/lochness/">Loch Ness</a></em>.</p>
<p>The game is, of course, very flawed. It does receive quite favorable reviews, but there&rsquo;s just so much you can do in 2 days, especially if you strive for a <em>strategy</em> game. For me, though, the biggest success is that it only gives you a few options at a time, and they&rsquo;re not dumb, and you still play in a sandbox world.</p>
<p>The way I did this was simple, really. I wrote the AI code that scores different strategic moves according to their immediate desirability. (For example, moving troops from a well-supplied place to a place where they would starve receives a low score. Attacking an undefended enemy city receives a high score. And so on.) In traditional AI fashion, this code is then used by the opposing factions<sup id="fnref3"><a href="#fn3" rel="footnote">3</a></sup> by scoring all possible moves and then picking the most desirable ones.</p>
<p>But — since I already have a mechanism to score moves — I can use the same thing for the player. I score all the possibilities, sort them, then pick the first few and bring them up as options.<sup id="fnref4"><a href="#fn4" rel="footnote">4</a></sup></p>
<p>This makes sure that you don&rsquo;t need to pick from 100 or more options,<sup id="fnref5"><a href="#fn5" rel="footnote">5</a></sup> most of which are irrelevant or dumb. But it still gives you the freedom of a simulated world.</p>
<h3>But what about surprising choices?</h3>
<p>If you preselect options programmatically, you&rsquo;ll prevent the player/user from making surprising decisions, right? It&rsquo;s like railroading,<sup id="fnref6"><a href="#fn6" rel="footnote">6</a></sup> right?</p>
<p>I don&rsquo;t think so. </p>
<p>First of all, yes, you&rsquo;ll prevent things like shooting yourself in the foot. Things that are obviously dumb. People sometimes want to do those<sup id="fnref7"><a href="#fn7" rel="footnote">7</a></sup> but they get bored by them very quickly.</p>
<p>The really surprising and innovative things people do in games (and elsewhere) are seldom on a single action level. They are <em>strings</em> of non-dumb actions.</p>
<p>To make yet another gaming example: in a game like Civilization, you can let a city starve for no reason — that&rsquo;s innovative in a sense, but probably not the kind of innovative or emergent gameplay most game developers strive for.<sup id="fnref8"><a href="#fn8" rel="footnote">8</a></sup> On the other hand, if you invest heavily in technology, then sell that technology to others, and finance a space ship from that money, then you haven&rsquo;t done any dumb move along the way, but you did something interesting and maybe unexpected.</p>
<p>In short, it&rsquo;s up to the player what to do in the game world as long as it&rsquo;s not obviously dumb.</p>
<p>To be sure, there are still valid options that may seem dumb for the AI but that are actually clever.<sup id="fnref9"><a href="#fn9" rel="footnote">9</a></sup> What I&rsquo;m saying is that those are scarce exceptions. Most creative gameplay stems from choices that are not dumb, they&rsquo;re just orchestrated in an inspired way.</p>
<h2>So?</h2>
<p>I am extremely excited about this, especially since now that I have a prototype (Loch Ness) that kind of proves it&rsquo;s realistic, not just a pipe dream. </p>
<p>For games and interactive storytelling, I hope this means we can have complex game worlds with many options, but in a gamebook form, without the need of overly complicated UI. I&rsquo;m not saying I <em>only</em> want those. I still love to play games like Civilization, of course. But I <em>also</em> want those complex egamebooks to exist.</p>
<p>There are implications outside games, too. Think about an eshop that intelligently walks you through the checkout process (I made a <a href="http://filiph.net/eshop-ai/">prototype of that</a> recently). Think about an app that&rsquo;s easier to use. Think about a learning tool that lets you explore the subject in a way that&rsquo;s not overwhelming.</p>
<p>Thanks for reading this far. Let me know what you think.</p>
<div class="footnotes">
<hr>
<ol>
<li id="fn1">
<p>You could say that even strategic games like Civilization only present a few buttons at a time. But you&rsquo;re forgetting the world map where each of the thousands of tiles is a potential option.&nbsp;<a href="#fnref1" rev="footnote">&#8617;</a></p>
</li>
<li id="fn2">
<p>Almost all games are simulations. Super Mario or Pac-Man are simulated worlds, although very simple.&nbsp;<a href="#fnref2" rev="footnote">&#8617;</a></p>
</li>
<li id="fn3">
<p>In the Ludum Dare version of the game, there is just one opposing faction: the humans. But if I get to move the game forward, it&rsquo;ll be easy for me to add others. Also, the same code can be used for monsters (something like captains) inside the player faction, so the player can delegate.&nbsp;<a href="#fnref3" rev="footnote">&#8617;</a></p>
</li>
<li id="fn4">
<p>Actually, the algorithm of choosing the options to show is a bit more involved. To ensure that there&rsquo;s always variety, the algorithm makes sure that there are no more than three options of the same <em>type</em>. So even if the AI things the 5 most desirable actions for the player right now are to attack (the only thing changing is the city), then we only choose the 3 most desirable ones, but also give the player other types of options: laying eggs, moving, and so on.&nbsp;<a href="#fnref4" rev="footnote">&#8617;</a></p>
</li>
<li id="fn5">
<p>Move unit A to location α, move unit A to location β, &hellip; move unit Z to location ω.&nbsp;<a href="#fnref5" rev="footnote">&#8617;</a></p>
</li>
<li id="fn6">
<p>Railroading is the term used when a game keeps you from doing what you want and leads you in an overly linear fashion. TV Tropes has a <a href="http://tvtropes.org/pmwiki/pmwiki.php/Main/Railroading">good article about it</a>, as usual.&nbsp;<a href="#fnref6" rev="footnote">&#8617;</a></p>
</li>
<li id="fn7">
<p>Think games like Grand Theft Auto, where almost any player has tried at least once to do something self-destructive.&nbsp;<a href="#fnref7" rev="footnote">&#8617;</a></p>
</li>
<li id="fn8">
<p>I&rsquo;m sure some Civilization players out there have done it, but probably not more than once.&nbsp;<a href="#fnref8" rev="footnote">&#8617;</a></p>
</li>
<li id="fn9">
<p>The <a href="https://en.wikipedia.org/wiki/Rocket_jumping">rocket jump</a> is a good example.&nbsp;<a href="#fnref9" rev="footnote">&#8617;</a></p>
</li>
</ol>
</div>
Tue, 25 Aug 2015 18:45:38 +0200http://egamebook.com/blog/complex-systems-simple-interface/
http://egamebook.com/blog/complex-systems-simple-interface/48% Americans know what gamebooks are<p>I recently ran a miniature survey to gauge interest in <a href="http://egamebook.com/">egamebook</a> and to find out more about the kind of people who might be interested in it. I thought I&rsquo;d share what I learned because much of it could be interesting to others.</p>
<p><img src="/img/p/survey2.png" alt="Survey screenshot"></p>
<p>The survey ran in <a href="http://www.google.com/insights/consumersurveys/home">Google Consumer Surveys</a>, which is a tool that lets people do market research. These surveys then run on the web as an alternative to internet pay walls for websites that publish content. The surveys are pretty accurate, at least if you trust Nate Silver, who says that &ldquo;the Google consumer surveys&rsquo; election polls were ranked second in terms of reliability and lack of bias in predicting election results.&rdquo;<sup id="fnref1"><a href="#fn1" rel="footnote">1</a></sup> The software does the statistical magic to convert from numbers about recipients (sample) to numbers about the society (population) for you. The surveys are paid &mdash; one answer ranges from $0.10 to about $2.00. </p>
<p><strong>Disclaimer:</strong> I am a Google employee. But I did pay full price for the survey, and I had no internal help setting it up nor running it.</p>
<p><img alt="Survey gif" src="/img/p/surveygif.gif" style="max-width: 40%; float: right; margin-left: 1em; margin-bottom: 1em;" /></p>
<p>There were only two questions:</p>
<ol>
<li>Have you ever read a Choose-Your-Own-Adventure book or a gamebook?</li>
<li>How does this prototype of a mobile e-gamebook look to you?</li>
</ol>
<p>With <em>Consumer Surveys</em>, you get demographic data &lsquo;for free&rsquo; &mdash; you don&rsquo;t need to ask how old people are, what their income is, and so on. These pieces of information are inferred and approximated. So we have some data on who the people that play(ed) gamebooks are.</p>
<p>The survey ran in the US and so the numbers below apply to the US population.</p>
<h2>Are you ready for the results?</h2>
<p>I originally wanted to write an analysis for the data, but I think it&rsquo;s better to just give you <a href="http://www.google.com/insights/consumersurveys/view?survey=x3g6dhfydx34k&amp;question=1&amp;filter=&amp;rw=1">the link to the survey results</a> (which I just made public) and a couple of highlights. I&rsquo;ll ignore the second question here as it is specific to egamebook. Let&rsquo;s focus on the data on gamebooks in general.<sup id="fnref2"><a href="#fn2" rel="footnote">2</a></sup></p>
<ul>
<li>About <strong>48%</strong> Americans have at least heard about gamebooks or Choose-Your-Own-Adventure games.</li>
<li>Generally speaking, the younger you are, the more likely you are to know about gamebooks.</li>
<li>People who are <strong>25-34</strong> years old know them the most (only 37% have never heard the term).</li>
<li>When it comes to actually playing them, recently, the youngest cohort (18-24) wins (<strong>11%</strong>) followed by 25-34 (<strong>8%</strong>).</li>
<li>Men are only slightly more likely to know about gamebooks and play them than women.</li>
<li>Gamebook seem to be (have been) most popular on the West coast and in the Norteast of US.</li>
<li>Gamebooks are best known to the rich ($100K+ income). People with median income know the least about them.</li>
<li>It looks like parents are more likely to have played a gamebook recently than non-parents.</li>
</ul>
<p>None of those are too surprising, but it&rsquo;s good to have a bit of hard data.</p>
<div class="footnotes">
<hr>
<ol>
<li id="fn1">
<p>Source: <a href="http://en.wikipedia.org/wiki/Google_Consumer_Surveys">wikipedia</a>.&nbsp;<a href="#fnref1" rev="footnote">&#8617;</a></p>
</li>
<li id="fn2">
<p>I&rsquo;ll be a horrible person and report differences even when error bars overlap. Scientifically, it&rsquo;s wrong to say there&rsquo;s a difference. But I feel like in some cases, the error bars overlap so slightly it may not be scientifically correct but it&rsquo;s still worth reporting. You can see the data anyways, so make your own mind.&nbsp;<a href="#fnref2" rev="footnote">&#8617;</a></p>
</li>
</ol>
</div>
Tue, 10 Mar 2015 17:45:38 +0100http://egamebook.com/blog/data-about-gamebooks/
http://egamebook.com/blog/data-about-gamebooks/Blog started<p>Building <a href="http://egamebook.com/">egamebook</a> &mdash; the system for writing non-trivial electronic gamebooks &mdash; has been a years-long journey already and I have poured <em>lots</em> of energy, time and thinking into it.</p>
<p>I have built about 10 prototypes, written thousands lines of code in 3 different programming languages, collaborated with 3 amazing people, and put down more than 200 notes and ideas. I have learnt a great deal about interactive fiction, storytelling, game mechanics, API design, user experience, the addictive nature of chance, product development, natural language generation, goal oriented action planning, and much more.</p>
<p>So I&rsquo;m starting this blog.</p>
<p>You can put it into your RSS reader if you&rsquo;re into that kind of thing (the url is <a href="http://egamebook.com/feed.xml"><code>http://egamebook.com/feed.xml</code></a>), or you can <a href="https://groups.google.com/forum/#!forum/egamebook">join the mailing list</a>.</p>
Sat, 07 Mar 2015 17:45:38 +0100http://egamebook.com/blog/blog-started/
http://egamebook.com/blog/blog-started/