67 lines
1.7 KiB
Markdown
67 lines
1.7 KiB
Markdown
# Cards For Humanity
|
|
|
|
A game master server for the popular game [Cards Against Humanity](https://www.cardsagainsthumanity.com/) using data from [Chris Hallberg](https://crhallberg.com/)'s project [JSON Against Humanity](https://github.com/crhallberg/json-against-humanity) (everyone say "Thanks, Chris!")
|
|
|
|
This started as a problem trying to play games with friends who are all on different platforms. This shall be as cross-platform as it gets. I want it to work on anything that can establish a connection and allow anyone to write any front-end they can dream up whether it be a web page, chat bot, VR, etc. Any clients who share a master server can play together across any platform.
|
|
|
|
|
|
## Test/Dev:
|
|
|
|
### Server
|
|
With auto-reload:
|
|
* [Install cargo-watch](https://github.com/watchexec/cargo-watch?tab=readme-ov-file#install)
|
|
|
|
Then:
|
|
|
|
```sh
|
|
watch -i client -cx run
|
|
```
|
|
|
|
or if you're lazy like me just run `./test`
|
|
|
|
|
|
Without auto-reload:
|
|
```sh
|
|
cargo run
|
|
```
|
|
|
|
### Client
|
|
* [Install Trunk](https://trunkrs.dev/#install)
|
|
|
|
Then:
|
|
|
|
```sh
|
|
trunk serve --open
|
|
```
|
|
|
|
## Build:
|
|
|
|
### Client
|
|
```sh
|
|
trunk build --release
|
|
```
|
|
|
|
### Server
|
|
```sh
|
|
cargo build
|
|
```
|
|
|
|
----------
|
|
* The server automatically serves the built client from `/dist` at `0.0.0.0:3030`
|
|
|
|
* Configure any custom clients to connect to `ws://0.0.0.0:3030/websocket`
|
|
|
|
|
|
## TODO:
|
|
* finish game logic
|
|
* prevent multiple users claiming the same identity and then all losing it - may create a zombie
|
|
* prevent zombie users after browser crash
|
|
* figure out proper auth - client's problem?
|
|
* use db
|
|
* test bincode and probably move away from json
|
|
* make typescript sdk
|
|
* support card text editing
|
|
* prevent import of cards that have been seen already and edited
|
|
* handle duplicates
|
|
* efficiency
|
|
* make demo clients for multiple platforms and screens
|