Skip to content

lynx9687/civilization

Repository files navigation

Civilization

Territory strategy on a hex grid, inspired by Antiyoy. Rust + Bevy 0.18. Up to 8 players; turns run simultaneously for 60 seconds. Win by destroying all opponents. Rules: game-design/rules.md.

Server

cargo run -p server

UDP 0.0.0.0:8080 (desktop clients), WebSocket 8081 (browsers). Bind address:

cargo run -p server -- 127.0.0.1:8080

Behind a TLS proxy (wss://):

cargo run -p server --features wss

Client

cargo run -p client

Connects to 158.180.62.178:8080 by default. Server address:

cargo run -p client -- 127.0.0.1:8080

Web client

Prerequisites (wasm-bindgen-cli must match Cargo.lock):

rustup target add wasm32-unknown-unknown
cargo install wasm-bindgen-cli --version 0.2.118

Build and serve:

mkdir -p web-client/assets
./scripts/build_web_client.sh
cd web-client && python3 -m http.server

Open http://127.0.0.1:8000/. Start a server first — the build connects to ws://127.0.0.1:8081. The client wss feature switches to wss://158-180-62-178.sslip.io (see .github/workflows/deploy-pages.yml).

Data

Terrain yields: assets/terrain.ron. Unit stats: assets/units/*.ron. CIVILIZATION_ASSET_DIR overrides the asset directory.

Music

By AIVA.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages