Documentation
¶
Overview ¶
Command serve hosts the lab: one page and the web tree, under the same security headers and the same cache contract a deployed game gets, and the world the lab plays in, over GET /ws.
The page and the tree are read from disk, so editing the stylesheet and reloading is the whole loop. The world runs on a fixed tick in one goroutine, because the engine is not safe for concurrent use and was never meant to be; every socket feeds it intents and gets the world back. It answers SIGTERM by closing every socket with 1001 and waiting for them.
Click to show internal directories.
Click to hide internal directories.