Firefox compatibility issues.
[webcart1000.git] / index.html
1 <html>
2 <head>
3 <title>WEBCART1000</title>
4 <meta charset="utf-8" />
5 <script type="text/javascript" src="webcart1000.js"></script>
6 <style>
7 body {
8 font-family: sans-serif;
9 margin: 1em 15%;
10 }
11
12 h1 { text-align: center; }
13 h2 { margin-top: 2em; }
14 </style>
15
16 <script type="text/javascript">
17 setInterval(function () {
18 var element = document.getElementById("webcart1000-data");
19 element.textContent = JSON.stringify(webcart1000.data, undefined, 4);
20 return true;
21 }, 1000);
22 </script>
23
24 </head>
25 <body>
26 <h1>WEBCART1000</h1>
27 <p>
28 WEBCART1000 lets you make and play games that share the same
29 save files across several websites. It's inspired
30 by <a href="http://sharecart1000.com/">SHARECART10000</a>, which
31 did the same thing for non-web games.
32 </p>
33 <h2>Some Games Using It</h2>
34 <p>
35 coming soon.
36 </p>
37 <h2>Your WEBCART1000 Data</h2>
38 <pre id="webcart1000-data">(loading...)</pre>
39 <h2>How do I use it?</h2>
40 <p>
41 If you're making a web-based game, just
42 download <a href="webcart1000.js">webcart1000.js</a> and include
43 it via a &lt;script&gt; tag in your own game. It's
44 self-contained and sets up all its own listeners.
45 </p>
46 <p>
47 Once you're including it, you can access the save data with
48 <code>webcart1000.data.Whatever</code>
49 - <code>MapY</code>, <code>Switch2</code>, or any of
50 the <a href="http://sharecart1000.com/img/SHARECART1000guide.png">SHARECART1000</a>
51 keys, with the same restrictions. (It may take a few seconds
52 after the page is done loading to load the save data.)
53 </p>
54 <p>
55 To save and synchronize the data,
56 use <code>webcart10000.update()</code>. You can also pass an
57 object of changes, e.g.
58 <code>webcart1000.update({ MapX: 12, MapY: 13, Switch0: false
59 })</code>. Running <code>update()</code> will also scrub the
60 data so if you put any non-standard keys or values in it,
61 they'll be deleted.
62 </p>
63 <p>
64 If someone's playing two WEBCART1000 games at the same time, the
65 save data is updated in real-time!
66 </p>
67 <h2>Is it safe? Is it private?</h2>
68 <p>
69 Yes.
70 </p>
71 <h3>For Players</h3>
72 <p>
73 There's no cookies. There's no server-mediated
74 messages. Everything WEBCART1000, aside from loading its own
75 static JavaScript, stays on your computer.
76 It's as safe and private as the game would be otherwise.
77 </p>
78 <p>
79 Loading the game leaves at most a default web server log entry -
80 which you've already triggered just by reading this page. Since
81 no data is collected, we don't even have to make a promise we
82 won't share it with anyone - but if we do accidentally collect
83 some, we won't, and we'll just delete it.
84 </p>
85 <h3>For Developers</h3>
86 <p>
87 The provided WEBCART1000 scripts take pains to scrub and
88 normalize the data as much as possible. But this is the web, and
89 they're not served over HTTPS, and people make mistakes. Take
90 the kind of precautions you'd always take in talking to a remote
91 server.
92 </p><p>
93 The <a href="webcart1000.js">webcart1000.js</a> script can be
94 moved to your own server and loaded from there. I recommend this
95 - it'll be faster and stabler. The <a href="o_o.js">o_o.js</a>
96 script and HTML can't be moved unless you're going to make your own
97 WEBCART1000 - which you can if you want, but it also kind of
98 defeats the point.
99 </p>
100 </body>
101 </html>