Answer the question
In order to leave comments, you need to log in
Rust game server for turn-based game, how best to implement?
Hello everyone, I recently started learning Rust, and I want to practice in parallel.
I decided to try to make a simple turn-based game with multiplayer, with a server in Rust and a Client in Unity (C#).
Prior to this, there was no experience in multiplayer solutions at all, I could do a simple web-api on Sharpe at most.
I don’t really want to write my own solution from scratch, and there is not much knowledge on this topic, but the number of libraries makes everyone’s eyes run wide.
I would like to make the game itself as simple as possible, in terms of architecture. Much like in chess. The two players take turns making one or two moves per round.
I would like to get a couple of answers to these questions:
Answer the question
In order to leave comments, you need to log in
1. Tokyo - practically no alternative.
2. No, the session with the client is just better to abstract from sockets. The client software must be able to terminate the tcp session and then reopen it. And all this should happen without losing the actual session.
3. Not necessarily. The protocol can also be implemented on udp. http/3 for example is quite udp-based.
4. Serialization-deserialization here in any case takes place. I think in this case json/xml is a normal option. As an alternative, you can also look at protobuf, here everything will definitely be faster to serialize-unpack than in json.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question