Search Unity

Resolved How to make a online chat

Discussion in 'Multiplayer' started by Vesnushkin_inc, Oct 10, 2017.

  1. Vesnushkin_inc

    Vesnushkin_inc

    Joined:
    Oct 10, 2017
    Posts:
    1
    You know games like clash of clans and king of thieves and more have a chat we’re uou can talk to guild/ clan members? If you know it would help a ton, or if there is a tutorial on how to make it can someon gimme the link?
     
  2. MiladZarrin1

    MiladZarrin1

    Joined:
    Jul 7, 2013
    Posts:
    78
    Photon Unity Networking (https://www.photonengine.com/en/PUN) offers a real time chat system. You can also make it using UNet (https://blogs.unity3d.com/2014/05/12/announcing-unet-new-unity-multiplayer-technology/) or any other real time networking systems for unity. They offer a lot of features that you may or may not need. They are also a little pricey.
    Or you can make it from scratch using node js (https://whackcode.wordpress.com/2013/09/19/unity3d-talking-to-node-js/) or probably other programming languages. But it is very time consuming.
    It's up to you to choose the best solution for your project.
     
  3. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    It's really quite simple to do with Photon, I did it before.

    In Photon, just have a text box for the UI, and send RPC's back and forth with the message, done.

    E.G.

    Code (CSharp):
    1. using UnityEngine.UI;
    2.  
    3. PhotonView myView;
    4. string chatRoomText;
    5. public Text chatText; // Give a reference to the TextUI where the chatroom Text is at.
    6.  
    7.  
    8. if(myView.isMine){
    9. string messageToSend = "Hello";
    10. myView.RPC("MethodName", PhotonTargets.AllBuffered,0, messageToSend);
    11. }
    12.  
    13.  
    14. [PunRPC]
    15. void MethodName(string newMessage){
    16. chatRoomText = chatroomText + newMessage;
    17. chatText.text = chatRoomText;
    18. }
    Also the "0" after AllBuffered may not be needed, I think it should be there, I just forgot, it will either need to be there or not.
     
    Last edited: Oct 13, 2017
  4. hlw

    hlw

    Joined:
    Aug 12, 2017
    Posts:
    250
    There are also ways to do it using an IRC channel.
     
  5. JordanSchuetz

    JordanSchuetz

    Joined:
    Jan 23, 2013
    Posts:
    7
    Checkout http://unity.chat for a pretty easy tutorial on how to make a chat application yourself. Hope this helps.
     
    SmallLion likes this.
  6. lucaskingz

    lucaskingz

    Joined:
    Oct 28, 2023
    Posts:
    1
    I understand that you're looking for guidance on creating an online chat feature similar to those found in games like Clash of Clans and King of Thieves, where players can communicate with guild or clan members. While I can't provide a direct link to a tutorial for that specific task, I can offer some guidance on the general steps you might follow to implement such a feature.

    To create an online chat feature for your app or game, you'll need to consider the following:

    1. Backend Server: You'll require a backend server to handle real-time communication. Technologies like Node.js with libraries such as Socket.io or Firebase Realtime Database can be helpful.
    2. Authentication: Implement user authentication to ensure that only authorized users can access and use the chat.
    3. Real-time Messaging Protocol: Choose a real-time messaging protocol like WebSocket to enable instant communication between users. This will ensure that messages are delivered in real-time.
    4. User Interface: Design a user-friendly chat interface for your app. You may want to include features like one-on-one chats, group chats, and the ability to share multimedia.
    5. Notification System: Implement a notification system to alert users about new messages, ensuring they don't miss any important conversations.
    6. Moderation and Reporting: Include moderation features to maintain a healthy and safe chat environment. Users should be able to report inappropriate content.
    7. Scaling: Consider how your chat system will scale as more users join. Cloud services like AWS or Google Cloud can help with scaling and reliability.
    While games like Clash of Clans and King of Thieves offer in-game chats for players to communicate with their guild or clan members, creating a similar live chat feature for a standalone app like "Mango Live APK latest version" would require custom development. You can look for tutorials or seek out developers experienced in chat app creation to help you implement this feature in your app.
     
    Last edited: Oct 30, 2023
  7. ovyhossain8

    ovyhossain8

    Joined:
    Apr 12, 2024
    Posts:
    1
    Have a chat with other players in your guild or clan. You are familiar with games like Clash of Clans, King of Thieves, and others. Could someone please provide the link to a tutorial on how to make it, if you know it would be very helpful.


    Many thanks, and best of luck with your work! https://apkallpure.com/