cards for humanity
Find a file
2024-12-24 23:18:44 -05:00
.cargo use tokio console 2024-10-10 04:15:25 -04:00
client fix being able to submit 0 cards when judging and locking up the game 2024-12-03 19:52:47 -05:00
data rm numbers 2024-10-16 21:07:48 -04:00
lib update/cleanup deps 2024-12-03 17:45:50 -05:00
server rm rwlock 2024-12-13 14:38:08 -05:00
tools/socket_blaster cleanup and get ready for bitcode 2024-11-19 01:32:06 -05:00
.gitignore gotta go fast 2024-08-28 22:55:16 -04:00
build automate deployment 2024-10-07 20:14:41 -04:00
CAH_PrintPlay2021-GameRules.pdf add rules 2024-04-07 01:01:55 -04:00
Cargo.lock update deps 2024-12-24 23:18:44 -05:00
Cargo.toml ditch js client 2024-12-03 17:52:45 -05:00
LICENSE license 2024-04-07 00:50:05 -04:00
readme.md new url 2024-12-03 17:55:19 -05:00
rust-toolchain.toml use nightly 2024-10-30 21:22:56 -04:00
tailwind.config.js ditch js client 2024-12-03 17:52:45 -05:00
test ditch js client 2024-12-03 17:52:45 -05:00
Trunk.toml ditch js client 2024-12-03 17:52:45 -05:00

Cards For Humanity

Live at https://humanity.cards

A game master server for the popular game Cards Against Humanity using data from Chris Hallberg's project 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:

Then:

./test

Without auto-reload:

cargo run -p server

Use -b <ADDR> or --bind <ADDR> to bind the server to a specific address. Default is 127.0.0.1:3030. You can also pass arguments to the test script.

Client

Then:

trunk serve --open

Build:

Client

trunk build --release

Server

cargo build --release

  • The server automatically serves the built client from /dist at 127.0.0.1:3030. When building for release the client automatically points to the live server.

  • Configure any custom clients to connect to ws://127.0.0.1:3030/websocket for local testing or wss://humanity.cards/websocket to use my server.

Tools:

There is a tool named socket_blaster used for stress testing the server.

Run

cargo run -p socket_blaster -- -h

to see available options.

Then

cargo run -p socket_blaster -- [COMMAND]

to run a command.

TODO:

  • 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