-2

I'm currently working on a mutliplayer game in Unity3d with the following requirements:

  • Developed in Unity3d (built for Android, iOS & WebGL)
  • Must connect on port 80 to support most firewalls (schools, offices, etc)
  • Game is divided to rooms (max 5 players in same room)
  • Very low amounts of messages sent (around 1-2 every 5 seconds)
  • Full duplex communication (client -> server, server -> client)
  • Server side needs to be able to scale up horizontally and support high amounts of CCUs (obviously not written with Unity)
  • Work well on mobile networks, assuming some players will have poor connections

For the sake of simplicity, Clash of Clans' does pretty much the same type of communication.

I'm currently thinking what would communication tech stack would be best fitted for supporting all the product specs.

Ron
  • 1,806
  • 3
  • 18
  • 31

2 Answers2

0

Currently this is what I'm considering:

Current tech stack idea

  1. Players will connect using WebSockets on port 80
  2. Host our game servers on stateless machines with session stickiness enabled
  3. Have a centralized cache layer (Servers first try to load data from here)
  4. Have a persistent DB layer (If we get a cache miss, load from DB)
  5. Any changes in a room's state in a server will fire a pub/sub event to update any existing player connections on other servers

I would be happy to hear if anyone has a better idea that can answer my requirements any better.

Ron
  • 1,806
  • 3
  • 18
  • 31
0

Not sure if you want to code the communication stack by yourself. If you want to look at third party solutions, did you check SmartFoxServer?

Flying_Banana
  • 2,864
  • 2
  • 22
  • 38
  • Never said I was going to write it myself, just wondered what was the best solution (existing or non existing). I'll check out SmartFoxServer. – Ron Oct 31 '15 at 09:23