Skip to content

teohhanhui/hexciv

Repository files navigation

Hexciv

Civ VI inspired game, written in Rust using the Bevy game engine.

Setup

Setup matchbox_server

cargo install matchbox_server

Setup wasm-server-runner

Install and setup wasm-server-runner.

Run

Run matchbox_server

matchbox_server

Serve the game

WASM_SERVER_RUNNER_ADDRESS=0.0.0.0 cargo run --target wasm32-unknown-unknown

Roadmap

(We're targeting only the base game without expansion packs and DLCs for now.)

FAQs

  • Will there be a single-player mode?

    No.

  • How are multiplayer games hosted?

    There is a matchmaking server which connects players directly (peer-to-peer). There is no hosted server where game sessions are stored.

    Technical explanation:

    • Peer-to-peer WebRTC using https://github.com/johanhelsing/matchbox
    • All game logic processed on the host's game world
      • To make a move, other players must send requests to the host
      • Host broadcasts events to other players, which are then synced / updated in their own game world
  • How do I join a game?

    The host needs to share the game session ID. You can join a game session by entering the ID.

    Note: Not implemented yet. Currently any 2 successive players who connect to the matchmaking server would be paired up with each other.

  • How many players can we have in a game?

    2-4 players.

    Note: Not implemented yet. Currently any 2 successive players who connect to the matchmaking server would be paired up with each other.

  • How do I rejoin a game if I got disconnected?

    You can rejoin an active game session by entering the ID. It's not possible to rejoin a game if the host leaves.

    Note: Not implemented yet. Currently any 2 successive players who connect to the matchmaking server would be paired up with each other.

  • What happens if the host or another player disconnects?

    The game will be paused until all players reconnect.

    Note: Not implemented yet.

  • Can I pause the game?

    Only the host can pause the game (by selecting "Pause" from the in-game menu, or by pressing P on the keyboard).

    Note: Not implemented yet.

  • How does a player win a game? / How does a player achieve victory?

    This is currently not planned. Just keep playing for as long as you'd like (or you have wiped out everybody else).

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

WIP

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages