Civ VI inspired game, written in Rust using the Bevy game engine.
cargo install matchbox_server
Install and setup wasm-server-runner.
matchbox_server
WASM_SERVER_RUNNER_ADDRESS=0.0.0.0 cargo run --target wasm32-unknown-unknown
(We're targeting only the base game without expansion packs and DLCs for now.)
-
Map generation
-
Generate elevation map using https://github.com/TadaTeruki/fastlem
Known issues:
- This is not ideal as it's not designed for "world map" style terrain generation, but it's a quick and easy way to have something. See TadaTeruki/fastlem#3
-
-
Known issues:
- Desert should be contiguous regions, not just scattered all over the place.
-
Known issues:
- High elevation areas tend to clump together. See TadaTeruki/fastlem#3
-
Known issues:
- Currently any water tile adjacent to any land tile is treated as coast.
-
We need a way to detect enclosed bodies of water.
-
-
Known issues:
- This needs a lot more work to have rivers that feel right. See for example https://en.wikipedia.org/wiki/Stream_order
-
-
Spawning of starting units
- Space out the starting positions for different civs
- Spawn civs with starting bias
-
Unit movement with pathfinding
- Pathfinding using A* search algorithm
- Limit pathfinding to partial knowledge (i.e. "fog of war")
- Only tiles already explored by the current player would have a known movement cost.
- Only tiles already explored by the current player would have known presence / absence of neighboring tiles. If the neighboring tile positions have never been inside any unit's sight range, they must be assumed to exist.
- If there are any changes allowing / denying movement since the last seen time, the changes must NOT be taken into consideration. Pathfinding must be based on the last known map by the current player.
- Queue movement for next turns when there's not enough movement points
- Show indication if there is no path for a move
- Conditionally allow units to embark
-
Simultaneous turns
Known issues:
- TBD
-
Basic combat mechanics
-
Saving and loading of a game
-
Rejoining a game, e.g. after a disconnection / reconnection
-
Tech tree
-
Civic tree
-
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).
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/license/MIT)
at your option.
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.