Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[WIP] Flexible Chat

Discussion in 'Works In Progress - Archive' started by thormond, Jan 21, 2015.

?

Which system do you prefer?

  1. Easy-to-use but affects the framework negatively and may cause problems in the future

    1 vote(s)
    12.5%
  2. Something that takes a while to setup but is more flexible and performs the best

    7 vote(s)
    87.5%
  1. thormond

    thormond

    Joined:
    May 11, 2013
    Posts:
    33
    Hello there,
    I've been working on an ultimate MMO-like chat system for Unity. Here are some key features that would distinguish it from other chat systems on the asset store:
    • Unity 4.6 UI, nothing legacy
    • It will be a closed single-responsibility system, it wouldn't force the user to use a certain solution for networking/other ways of supplying data.
    • It would be based on dependency injection, there will be an interface that will contain all the I/O functions that the system would use to communicate with user's code and user will have to supply an implementation of that interface to the system. Because of that you will be able to use uLink, Photon, standard unity networking or even use the chat for your offline game (if you need a combat log, loot log, NPC dialogue log or just a console for debugging)
    • There will be all the functionality of the chat that you see in MMOs like: creating new tabs with custom filters, dragging the chat around, spliting tabs into multiple chat groups by dragging the handler, resizing the chat window with resize handler, changing filtering data in runtime, input that scans for the tag of the message and controls if the input is valid, etc.
    Would you buy such a system and for how much? What are your ideas to make this system even better?

    I'll be posting videos on that soon.
     
    Keyserjaya99 and RoyalCoder like this.
  2. Xoduz

    Xoduz

    Joined:
    Apr 6, 2013
    Posts:
    135
    Colour me intrigued!

    Here are some random and not-well-structured thoughts on what an "ultimate" chat system should include (from both a user and a developer perspective):

    • Ability to open new chat tabs and channels for players via server (to open chat tabs for private messages, guild-chats after joining a guild, etc.)
    • Custom chat channels that users can administer themselves (almost like IRC channels). They can invite people to the chat, they can kick people from the chat (and/or ban them), they can specify if the chat is private (invite only/password needed) or public (anyone can join), can set other players as moderators, etc. Channel data is retained for X amount of time after last user goes offline from channel. Timer refreshed whenever anyone logs back into channel, but channel data (owner, moderators, settings) is removed if timer elapses.
    • UI to display available public chat channels? Might be overkill, and you might end up with absurdly long lists.
    • Right-click on a name in the chat to bring up a customizable context menu (examples of what this can be used for: Add Friend, Invite to Party, Whisper, Ignore, Report Spam, etc. Up to the developer what to put in here.)
    • Colored chat messages in chat based on criterias like... friend, foe, party member, guild member, admin/gamemaster/support, etc. Note: Both names and chat messages themselves all in one color (colors customizable by user)
    • Option for timestamping chat messages (of any kind)
    • Option for minimizing the chat-window (for instance by minimizing it to a "bar" with a button to unhide it along bottom of chat window), to hide it when not needed - without removing it completely.
    • Option for displaying the chat channel in front of names in the chat. So if you have a chat-tab with filters displaying several chat-channels (party, group, whisper, custom chat channel), it's easy to identify which it belongs in (not just by color)
    • Option for client-side logging of chat in external log file
    • Option for copy text from & paste text to the chat window
    • Notification system of some sort for private messages (popups, UI elements that show that you have private messages waiting)
    • Option for playing sound-effect/other effect (shake chat window, flash, blink, other stuff) when user's own name is mentioned in chat (or customizable trigger words for this, with customizable effects)
     
  3. thormond

    thormond

    Joined:
    May 11, 2013
    Posts:
    33
    Here's the first part of WIP showcase:
     
  4. Xoduz

    Xoduz

    Joined:
    Apr 6, 2013
    Posts:
    135
    I watched your video and noticed that the minimize feature (yay!) minimizes the chat-window "upwards" (hides the main chat window, leaves the tabs where they are). In my opinion it'd be more useful if they minimized "downwards", for instance by moving tabs to the bottom edge of where the main chat-window was. Otherwise minimizing will leave a row of tabs in the middle of one's screen. Click any of the tabs, and they pop back up to where they used to be and show the main chat window again.

    Another alternative (or additional feature) to minimizing the chat-tabs could be to fade out the entire chat-window (and tabs) after X seconds of in-activity, and then have it pop back in when you move the mouse-cursor over it or press Enter (or whatever key is the designated "start chatting" button). Might want to allow user to disable this, though.

    Some more general thoughts:
    • A client-side option that makes the chat-window "click-through-able". With this enabled, the user would not be able to click on the chat window with the mouse unless said window is active (activated by pressing enter-key (or reply-to-message hotkey or whatever) to start typing), to allow clicking on game-objects that might be showing behind the chat-window.
    • Transparency-option. Allow user to set how transparent the chat-window should be, from opaque (0%) to very transparent indeed (99%, or however transparentis just enough to still be able to see the chat)t
     
  5. thormond

    thormond

    Joined:
    May 11, 2013
    Posts:
    33
    Actually that minimize feature right now is not a feature but a bug with Unity's ToggleGroup and Toggle elements. It happens when you disconnect Toggle from ToggleGroup in the runtime while only one element is left in the group.

    I'll make it a controlled feature that will be toggled by 'allow swifch off' on the ToggleGroup (like it was intended to be). For the fancy stuff like controlling the position where it will be folded (which probably should be handled by an animation) I'll probably add some events (like OnAllChatTabsInactive or OnToggleGroupOff ) that will allow the system to be easily modified by some easy custom scripts on the hierarchy and then make some examples for those. All the optional things should be done this way in my opinion with the core doing just the basic stuff.

    I've forgot to add: that white thing on the left is a scrollbar, it's already working but the content panel with Text child is not big enough for it to have any effect.

    I don't think that would add anything to the UI behaviour since usually nothing is under the chat window. For the 3D stuff the window wouldn't block raycasts from camera through the mouse coordinates into the 3D space since it's on a different kind of layer.

    User can already do that by changing alpha channel on the graphics in the prefab for the ChatTab. Unless you mean some global alpha multiplier that will be accessible on top of the prefab?
     
  6. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    This is great! Exactly what I need.
     
  7. Xoduz

    Xoduz

    Joined:
    Apr 6, 2013
    Posts:
    135
    I mean an option that will be available to the end-user (player) to change the transparency level of the chat-window on the fly as the game is being played. If that's already possible, great!
     
  8. Christian-Tucker

    Christian-Tucker

    Joined:
    Aug 18, 2013
    Posts:
    376
    I wouldn't pay more then a few dollars at most for this, probably $5 being the maximum, but when you think about it ethically, $5 is a decent amount to get a decent amount of sales from all the newbies that want to create a MMO.

    I already know how to do this, so it may be slightly biased answer, but it's just my thoughts on pricing, since you asked.
     
  9. thormond

    thormond

    Joined:
    May 11, 2013
    Posts:
    33

    I guess there's still few features to implement like changing the Tab tags/Tab names in the runtime, XML serialization of the chat settings/tab filters and exposing more public events. After those the package should be ready to submission once the documentation is ready
     
    KingTooTall and Xoduz like this.