1 OTTER - ONLINE TABLE TOP ENVIRONMENT RENDERER
2 =============================================
4 Otter is an online "table simulator" intended to be suitable for board
7 It is accessed from a web browser running JavaScript. The server runs
8 on a convenationl Unix host. Currently, joining a game requires a
9 unix shell account on the server.
11 The game does not have a built-in text chat system, nor any other
12 communication other than via moving the game pieces. I expect it to
13 be used with a concurrent voice chat, or perhaps a concurrent text
14 chat program. Right now the arrangements for the chat must be agreed
15 by the players without help from the Otter server.
17 Right now Otter is in an alpha state.
24 otter join-game unix:<user>::<game-name>
26 otter join-game unix:ijackson::test
28 See otter --help for further options, including setting your nick.
30 Currently when a new player joins a game (with the `otter` command),
31 all the other players must reload the page.
37 otter reset --reset-table local-users :test demo
38 /^^^^^^^^^^^ ^^^\ ^^^^'~ game spec
41 Here "local-users" refers to the file "local-users.table.spec" in the
42 Otter specs directory (/volatile/Otter/specs on chiark). The table
43 spec file handles access control (and some other global properties)
44 This particular file says that all local shell account users may join
47 ":test" is the game name. It starts with a colon, which means
48 implicitly "unix:<whoami>::test". Other people have to name the game
49 with the full name, with all three colons in it.
51 "demo" refers to the file "demo.game.spec". The "game spec" says what
52 shape table is and what pieces there are. This is a simple demo game.
53 There is also "penultima" which is a work-in-progress set of pieces
54 suitable for fairy chess etc.
56 See otter --help for some more options.
58 Currently, resetting a game (or otherwise adding or removing pieces)
59 will mean all the players will get errors until they reload the page.
65 If you want to use existing piece shapes that Otter already knows
66 about, you can do this by providing a game.spec.toml file. The format
67 of these files is a TOML document representing a GameSpec as found in
68 src/spec.rs in the Otter source code.
70 todo: use rustdoc to provide this somewhere.
75 Otter uses SVGs. The sources for the SVGs are all in the otter source
76 tree, in the library/ directory.
78 Some of these SVGs were scraped from Wikimedia. The scraper machinery
79 can perhaps be adapted to scrape SVGs from elsewhere.
81 You can also add your own SVGs in the library/edited/ directory.
82 If you do that, please make sure to include the actual source code.
83 If you copied or adapted an SVG from somewhere, provide details.
85 Contributions should be via git branch, eg a merge request on Salsa:
86 https://salsa.debian.org/iwj/otter
93 These instructions have been tested on Debian buster.
98 You will need about 6Gby of disk space.
101 sudo apt install build-essential git curl pkg-config libssl-dev node-typescript
103 2. Install Rust. This is most easily done with rustup:
105 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
107 and then follow the instructions about your PATH. If this rune alarms
108 you, see below about Rust privsep.
110 3. Switch your Rust install to use Rust Nightly and add the WASM
113 rustup default nightly
114 rustup target add wasm32-unknown-unknown
116 4. Install some build tools:
119 cargo install bundle-sources
121 This will put them in ~/.cargo/bin, which the rustup curl rune above
122 will have arranged to put on your PATH.
124 5. Install the version of wasm-pack with the option I need, which
125 upstream haven't taken (or refused) the MR for:
127 git clone https://github.com/ijackson/wasm-pack.git -b cargo-opts
131 NB that wasm-pack will itself download and install more stuff when it
132 is run by the otter Makefile.
138 git clone https://salsa.debian.org/iwj/otter
146 You will want to start with the git branch
149 You must use "make" to build the whole thing, although you can run
150 "cargo build" to build the
152 You cannot build it just with `cargo`, you must use `make`.
154 You will also need various other utilities and dependencies. See
155 below. On my own laptop deployment is done with `make deploy` which
156 copies all the relevant sources into the `bundled-sources` directory,
157 which is accessible via the Otter web UI. See the code in `Makefile`.
162 * Rust Nightly (sorry)
164 * `cargo` and a willingness to let it download all the dependencies
165 and run them, from crates.io. You can use my `Cargo.lock.example`
166 if you like. I use a privsep scheme to avoid running stuff from
167 cargo in my main account on my laptop. Using the not properly
168 released `nailing-cargo` program.
170 * `tsc`, Microsoft's Typescript compiler. The version in Debian
173 * `wasm-pack`, a program for manipulating WebAssembly files. This
174 too likes to run cargo and do god knows what.
176 * `resvg`, a program for manipulating SVG files.
178 * `bundle-rust-sources`, an un-released Rust package for publishing
179 source code of Rust projects.
183 * For running on chiark I build with the Rust target
184 `x86_64-unknown-linux-musl` which on my system is configured to
185 produce a completely statically linked bionary:
188 [target.x86_64-unknown-linux-musl]
189 rustflags = ["-C", "target-feature=+crt-static"]
190 # ^ from https://stackoverflow.com/questions/31770604/how-to-generate-statically-linked-executables