I want to build a chat system in my multiplayer game, but I realized that I’ll need an extra server dedicated for the chat only.
So I thought I could use some kind of “build-independent” chat system. I mean the game doesn’t need to connect to any server in order to interact with the chat.
It sounds weird, but could I use the WWW class somehow in order to read and talk in the chat?
I guess a simple chat would be OK, but I need something more complex. I need a lobby chat and a server chat.
Once the player logs in, he goes to the lobby.
In the lobby he is able to send and receive 3 types of messages: messages from his own team, public messages, private messages.
After he joins a server, he needs to be able to talk to the people who are playing in the same server too, so there are more 2 types of messages: messages from his own team in the server and public messages in the server.
I guess there’s no problem with the server chat, once the player is connected and the messages can be shared trough RPC calls, like the usual.
Here comes the reason why I’m creating this topic: once the player joins a private server, he’ll need to disconnect from a possible “chat server”, thus he wont be able to view the lobby chat anymore. He needs to be able to view the lobby chat and the server chat at the same time.
depends how you set it up… not with unity’s build in network system]
but you can connect the server to the main server then get the data and make it a server again or something like that :).
If your chat should be independent from the match played, better use a completely separate connection for chat.
You are likely able to run a IRC software server on the same machine that runs the master. You could use any IRC implementation, get something stable and independent out of the box and if your game is too successful, you can move the chat to some other machine, too.