Add license, readme.
authorJoe Wreschnig <joe.wreschnig@gmail.com>
Tue, 12 Nov 2013 00:38:22 +0000 (01:38 +0100)
committerJoe Wreschnig <joe.wreschnig@gmail.com>
Tue, 12 Nov 2013 00:38:22 +0000 (01:38 +0100)
LICENSE.txt [new file with mode: 0644]
README.md [new file with mode: 0644]
o_o.js
webcart1000.js

diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644 (file)
index 0000000..ade5ed4
--- /dev/null
@@ -0,0 +1,9 @@
+The person who associated a work with this deed has dedicated the work
+to the public domain by waiving all of his or her rights to the work
+worldwide under copyright law, including all related and neighboring
+rights, to the extent allowed by law.
+
+You can copy, modify, distribute and perform the work, even for
+commercial purposes, all without asking permission.
+
+See https://creativecommons.org/publicdomain/zero/1.0/ for details.
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
diff --git a/o_o.js b/o_o.js
index 061cbb3..85ee9da 100644 (file)
--- a/o_o.js
+++ b/o_o.js
@@ -1,3 +1,12 @@
+/* The person who associated a work with this deed has dedicated the
+   work to the public domain by waiving all of his or her rights to
+   the work worldwide under copyright law, including all related and
+   neighboring rights, to the extent allowed by law.
+
+   You can copy, modify, distribute and perform the work, even for
+   commercial purposes, all without asking permission.
+*/
+
 (function () {
     "use strict";
 
index 5ede7f9..170617f 100644 (file)
@@ -1,3 +1,12 @@
+/* The person who associated a work with this deed has dedicated the
+   work to the public domain by waiving all of his or her rights to
+   the work worldwide under copyright law, including all related and
+   neighboring rights, to the extent allowed by law.
+
+   You can copy, modify, distribute and perform the work, even for
+   commercial purposes, all without asking permission.
+*/
+
 (function () {
     "use strict";