aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-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."