(Yes, the UI will be improved.)
Multiplayer hangman, Written in Rust™.
This program has two parts: the client and the server. The server uses UDP, and runs on port 22565 (hmm), but you can change this by editing the code. Connecting to custom servers coming soon.
Here's how to set it up.
You don't need any special external libraries to build the server. Simply cargo build
or cargo run
.
Edit udpserver/src/lib.rs
. See the code snippet and comment below.
17 let socket = UdpSocket::bind("0.0.0.0:22565")?; // ← Edit the "0.0.0.0:22566" on this line.
18 let mut games = Mutex::new(vec![]);
19 let mut users = Mutex::new(vec![]);
You'll need cmake
installed to build this. On Linux and OS X, you can install cmake
from your package manager of choice. On Windows, you could install CMake from its website, or however else you want. Make sure to add cmake
to your PATH variable if you install it from the website.
You should just be able to run cargo run
afterwards.
Note: Make sure that the server is running before the client, since the client cannot handle a server connection failure gracefully yet.
You have to modify udpclient/src/main.rs
. See the code snippet and comment below:
26 let font = Font::from_file(font_path).unwrap();
27 let mut client = HangmanClient::new("127.0.0.1:22565").unwrap(); // ← Change the "127.0.0.1:22565" on this line.
Current state: extremely experimental and everything is unimplemented
Note: The font used by this project might not be licensed correctly. This will be fixed.