Until recently the multiplayer mode in Jolly Battle was based on uNet, but after Unity announced that uNet is deprecated and will be removed from Unity in the near future (more info here), we decided to migrate to other network solution.
The following requirements for a network service were needed:
- Hosting is provided by service. We are not deploying it.
- Peer-to-peer or Relay Server (this one should work only as a router of data).
- Wifi/LAN support;
- Matchmaker out of the box;
- Support for RPC or RPC-like protocol.
From our point of view, the best solution was Photon, which provides several products, thus, we started with BOLT. BOLT has a connection via Wi-Fi, but is buggy with disconnection and still requires to connect to servers in order to check a license. To resolve the problems connected with these limitations we moved to PUN (another Photon product).
Adapting PUN to our product wasn’t difficult since 99% of the events were based on RPC and PUN has built-in RPC protocol. Since we didn’t support back-compatibility with uNet we adapted architecture to Photon. Most of the problems were related to the first connection.
In the previous versions of JB, multiplayer mode worked by using LAN/Wi-Fi. While integrating Photon, we decided to implement a connection via pin-codes.
After testing and fixing bugs, finally, we released our app with a Photon solution.