Multiple problems with chat

edited July 2015 in Photon Chat
We tested out Photon Chat in our game briefly, about 75 CCU. Setting it up wasn't much of a problem, although based on the demo source code it seemed way too much functionality was in C# source code that we had to copy and paste, rather than in a dll. Anyways, trying to actually get it to work correctly, revealed many issues.

- The historyToRetrieve is bogus. Sometimes it would honor the amount given (20), sometimes (about 25% of the time) it would give 100. WORK-AROUND: OK, I suppose we can check for this, but come on...
- Occasionally (maybe 1 in 50) the player would have their name sent as an id like 2b3fab30e-32d8-4b55-a5d7-fa5e32f0d9cb instead of their player name. WORK-AROUND: Perhaps there is a way to check on the client what Photon thinks their user name is, and reconnect if it's wrong.
- Players report that the chat would stop responding for long periods of time, without the client getting a disconnect message. WORK-AROUND: We already implemented reconnecting if they are disconnected, but it's of no use if they don't get a disconnect msg. Since ChatClient is really just PhotonClient, I guess we could add in stuff like checking the ping and reconnect if there is no response
- There seems to be a considerable delay between posting the message and getting it to show up, eg on the order of a few seconds. If it's a socket connection and your servers aren't crumbling from being overworked, shouldn't it be almost instant? WORK-AROUND: Perhaps keeping the default of EU chat server isn't a good idea

Lack of features: For a chat service to be useful, there are a few key features that are needed:

- chat history in the administration dashboard. How are we supposed to moderate the chat without a history? WORK-AROUND: We ended up logging each message to our own server, which seems weirdly redundant, yet necessary
- back-end web API. We need to be able to send chat messages from our server, eg "System: Kyle defeated Joe!" WORK-AROUND: I see a lot of people have requested this, your response is "make your own java client and do it." Bah!

Considering the monthly fee, bugs, and lack of features... well... Honestly it would be better if we made our own chat server from scratch!


  • thank you for your report. Yes, chat is young product yet. We are intensively working on it to improve quality of service

    here is some feedback:
    - history. this is something new, will take look in to it.
    - userId. userId will be reported as guid if client sent it as empty or null. only in this case. so, please check how you get user name. and make sure that it is not empty or null.
    - not responding. last month we needed restart our servers more often then usually. this happened because we need to apply hot fixes. in some cases restart of server does not lead to client disconnect. but client will expirience delay. it would be good to know how long server is not responding
    - delay. how long? does it happens often? delay also may be related to restarts.

    - we are preparing plugins for chat. You will be able to send all your history to some backend and use it as you like

    - back-end web API. because of distributed nature of chat cloud it is not so easy implement. and if we will do this, we will not start in near future.
    What you described can be implemented on clients. I believe that if we will try to be flexible we will be able to find suitable solution for this. please write e-mail on [email protected]
  • Thanks for the feedback! After more testing and tweaking we found the following:

    - userId: looks like it was a problem on our end, with new players logging into chat before they set their player name, so it was empty as you mentioned
    - not responding: also appears to be a problem on our end, in Unity one big text string for the chat window grew too long and so Unity cut it off. We'll have to limit the scrollback buffer or implement it a different way eg one Text per chat message, in a vertical layout group

    Another feature request:
    Timestamps would also be something of use to most chat services. Of course the client can send the timestamp with the chat message as an object, but then it depends on each client's clock settings. We might be able to get the server time and then keep track of that offset from local system time, but again it seems like a lot of work for a feature that should come standard in a paid chat service

    Anyways, after putting in and tweaking some reconnect handling, it appears to be working much better now, thanks!
  • well, we will think about timestamp too

    thank you. Glad to know that not everything is so bad :)
  • Wulven:
    "in Unity one big text string for the chat window grew too long and so Unity cut it off. We'll have to limit the scrollback buffer or implement it a different way eg one Text per chat message, in a vertical layout group"

    We thought about adding an optional limit to the number of messages buffered in channels. Would that be what you're looking for or do you buffer the messages in your own code somewhere, optimized for output?
    I am not sure if everyone is happy with the way Channels now cache chats for them.

    If you have feedback on this, I would appreciate it.
Sign In or Register to comment.