aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolden Rohrer <holden.rohrer@gmail.com>2020-01-08 19:53:22 -0500
committerHolden Rohrer <holden.rohrer@gmail.com>2020-01-08 19:53:22 -0500
commit33c44b5f1c41881e16cd34f8e491def67f617724 (patch)
tree920309f8e10ee1778d8f0c20f3463cd31180bf8b
parentedaffde9f32706d88b0c94fbb45d4746c8f43e54 (diff)
added new readme info
-rw-r--r--README.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/README.md b/README.md
index c92df66..8078315 100644
--- a/README.md
+++ b/README.md
@@ -12,6 +12,13 @@ npm i
node examples/helloworld.js # To try out the hello world (read the code for more detail)
```
+## Quirks
+
+The server is a little bit weird sometimes. Most abstractions should work, but if you're trying to get into extending the code, be aware that:
+- Each write only takes 200 characters
+- Each server command MUST be separated by about a second or you will be kicked (I recommend `tools/queue.js` for handling this)
+- On the backend, the server uses tiles to group data, but this has mostly been abstracted
+
## Features
Currently, `socket.js` provides `Socket` which has a few signals and functions (documented in the code, of course) which allow abstracted interfacing with YWOT. However, certain facilities available in the old version like queuing or fetch division were scrapped in favor of more direct limits due to the unmaintainability of the old style.
@@ -27,3 +34,11 @@ Top-level scripts are part of the core API: `socket.js` and `space.js` are prett
Then, `examples/` provides use cases for it. `helloworld.js` is a basic "Hello World" printer, `spam.js` spams one message without attempting to conserve bandwidth, and `jarvis.js` provides the most advanced example (responds to the word `jarvis` by overwriting it with `yes, my liege`, but is capable of much more complex behavior).
`tools` and `utils` are similar to eachother in that they aren't very useful on their own, but are mostly distinct tools from the core API or user-facing scripts. The main difference is complexity: `tools` is reserved for complex (often persistent) utilities like `search` and `utils` for simple one-off functions like vector arithmetic, a min/max calculator for an array of coordinates, or helper tools for `space.comb`. They have been primarily motivated by attempts to discretize `examples`.
+
+## Stability
+
+- `space.js` and `socket.js` are not very liable to change, and probably don't have any big bugs.
+- `tools` is a bit more volatile, and are non-trivial extensions to the core API, so they may break, but `search` and `queue` are decent.
+- `utils` doesn't get overwritten/modified often, just extended, and the code is mostly "stub code," so relying on that is a pretty safe bet.
+- `examples` are highly volatile and expected to break, so don't rely on them because they are user endpoints, but `helloworld.js` will probably be fine for a while.
+- `tests` also likely won't change, but it's relatively simple and probably won't "break."