Add license, readme.
[webcart1000.git] / README.md
diff --git a/README.md b/README.md
new file mode 100644 (file)
index 0000000..7902815
--- /dev/null
+++ b/README.md
@@ -0,0 +1,56 @@
+WEBCART1000 lets you make and play games that share the same save
+files across several websites. It's inspired by [SHARECART1000], which
+did the same thing for non-web games.
+
+## How do I use it?
+
+If you're making a web-based game, just download `webcart1000.js` and
+include it via a `<script>` tag in your own game. It's self-contained
+and sets up all its own listeners.
+
+Once you're including it, you can access the save data with
+`webcart1000.data.Whatever` - `MapY`, `Switch2`, or any of the
+[SHARECART1000 keys], with the same restrictions. (It may take a few
+seconds after the page is done loading to load the save data.)
+
+To save and synchronize the data, use `webcart10000.update()`. You can
+also pass an object of changes, e.g. `webcart1000.update({ MapX: 12,
+MapY: 13, Switch0: false })`. Running `update()` will also scrub the
+data so if you put any non-standard keys or values in it, they'll be
+deleted.
+
+If someone's playing two WEBCART1000 games at the same time, the save
+data is updated in real-time!
+
+## Is it safe? Is it private?
+
+Yes.
+
+### For Players
+
+There's no cookies. There's no server-mediated messages. Everything
+WEBCART1000, aside from loading its own static JavaScript, stays on
+your computer. It's as safe and private as the game would be
+otherwise.
+
+Loading the game leaves at most a default web server log entry - which
+you've already triggered just by reading this page. Since no data is
+collected, we don't even have to make a promise we won't share it with
+anyone - but if we do accidentally collect some, we won't, and we'll
+just delete it.
+
+### For Developers
+
+The provided WEBCART1000 scripts take pains to scrub and normalize the
+data as much as possible. But this is the web, and they're not served
+over HTTPS, and people make mistakes. Take the kind of precautions
+you'd always take in talking to a remote server.
+
+The `webcart1000.js` script can be moved to your own server and loaded
+from there. I recommend this - it'll be faster and stabler. The
+`o_o.js` script and HTML can't be moved unless you're going to make
+your own WEBCART1000 - which you can if you want, but it also kind of
+defeats the point.
+
+ [SHARECART1000]: http://sharecart1000.com/
+ [SHARECART1000 keys]: http://sharecart1000.com/img/SHARECART1000guide.png