Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 00-new-world.html #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions docs/00-new-world.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ <h1 class=title><a href="https://github.com/livewires/you-win">you-win</a></h1>
<div class=prose>
<h1 id="new-world">New World</h1>
<h2 id="what-you-need">What you need</h2>
<p>You should have <code>you-win</code> running in Glitch, with:</p>
<p>You should have <code>you-win</code> running in VS Code, with:</p>
<ul>
<li>a new game file open (e.g. a file called <code>app.js</code>).</li>
<li>(optional) a phone running Chrome or Safari, with your glitch project opened.</li>
<li>a game file open (e.g. a file called <code>first.js</code>).</li>
<li>a Chromium tab on <a href="http://localhost:8000">http://localhost:8000</a>.</li>
</ul>
<p>Put your text editor and Chrome window side-by-side, if you can (and/or keep your phone open in front of you!). Whenever save in your text editor, <code>you-win</code> will automatically refresh the page.</p>
<p>Make sure you have line numbers turned on in your text editor.</p>
Expand All @@ -58,16 +58,13 @@ <h2 id="the-template">The template</h2>
<p>Have a look at the template that’s open in your text editor. It should have the folllowing parts:</p>
<ul>
<li><p>These lines load <code>you-win</code>, the library we’re using to help make our game.</p>
<pre><code class="lang-js">import * as UW from &#39;you-win&#39;
import {forever, Phone, World, Sprite, Text, Polygon, Rect, Sound} from &#39;you-win&#39;
<pre><code class="lang-js">const uw = require('you-win');
const {Phone, World, Sprite, Text, Polygon} = uw;
</code></pre>
</li>
<li><p>We then load in all the sounds and images we need. By default this will load some emoji we can use to make sprites.</p>
<pre><code class="lang-js">UW.init({

})
.then(() =&gt; {

<pre><code class="lang-js">// Load everything we need
await uw.begin();
</code></pre>
</li>
<li><p>We then make our <code>World</code>, which represents the screen.</p>
Expand Down