Turn-based game with unity transport

Hello
I’m working on a turn-based game with Unity transport, as you know in turn-based games there are not many packets sent and received in the game, so being sure about the message that is delivered to both server and clients is essential.
what is the best way to have a persistent connection and be sure that the server and client have received the packet?
note: we should consider it sometimes we have an unstable client connection and that client may every time receive a message or send a message with that connection.
for example, when we use WebSocket most of these part has been solved but for Unity transport what is the solution?

2 Likes

Hi,
If you want to add some reliability with Unity transport while using UDP, the recommendation is to use the reliability pipeline : Pipeline use | Unity Multiplayer Networking.
If you are more familiar with a WebSocket implementation, and if you are using one of the latest versions of the editor, (starting 2022.2), you can also upgrade Unity transport to 2.0 (Currently -pre release) that supports WebSocket transport. (Client and server over WebSocket | Unity Multiplayer Networking)

1 Like

Does Websocket transport support on mobile (android and IOS) without any issues?

Do you mean if it’s supported in a web browser running on a mobile device, or on native applications for these platforms? For the latter (native applications), yes it is fully supported. For WebGL builds running on mobile web browsers, then it will probably work, but bear in mind that Unity doesn’t officially support mobile web browsers for WebGL builds, so we don’t explicitly test for this scenario.