2

I have a master server whose purpose is to login and send players in a game queue, and instantiate/close hosts (lobby) when necessary.

Currently the clients (players and hosts) are using the NerworkClient class to connect to the NetworkServer of the master. They communicate with unity's NetworkMessage/RegisterHandler etc...

Players are only sending credentials and "I want to play" messages. Hosts can send their state, their lobby state & the end game score data.

I was wondering if using httplistener and webrequests could be possible and better (master and hosts can all be on the same machine).

Do you know if there are better ways in term of performance to achieve this kind of communication between different unity builds ?

FLX
  • 2,626
  • 4
  • 26
  • 57
  • There you can see some made examples: http://wiki.unity3d.com/index.php?title=Server_Side_Highscores – z3nth10n Feb 12 '17 at 16:52
  • Thanks, but this is more useful for master to db communication. I need something that can directly connect 2 unity instances – FLX Feb 12 '17 at 17:23
  • What do you think of NetworkServerSimple ? https://docs.unity3d.com/ScriptReference/Networking.NetworkServerSimple.html – FLX Feb 12 '17 at 18:38
  • checkout Grapevine for using REST to communicate between two applications. You can embed both a REST Client and a REST Server very easily. http://www.nuget.org/packages/Grapevine/ – Scott Offen Apr 25 '17 at 17:27

0 Answers0