Displaying the number of people currently formulating their thoughts within the client could provide some feedback on whatever someone is going to be saying something soon, this would effectively make it much more obvious whatever someone might be replying to someone or not.
In the case of a roleplays, this would provide information of whom might be replying very soon, and in some cases could hint that someone is hesitating to reply, leading to other people potentially suggesting or pushing them to speak out. (There's always a shy one after all.)
CONCEPT
The client handle nearly everything about it. It not only sends notification to the server that they're writing but also do the calculations required to know when someone has 'timed out' on their writing.
This means multiple smaller packets (msprep
) are sent to the server whenever text is being edited, the server would then transmit back to other clients in the same area that this specific user is currently preparing a message, or 'thought'.
Upon reception, the client would immediately push the packet on a queue that constitute a number of information.
The bubble and rectangle are purely cosmetics, they are just here to make it less boring to look at. The number provides in-real time the number of people actively preparing their thoughts.
After a certain time passes or the server send a clearing packet, the user will be purged from the queue, thus reducing the number of people shown as actively formulating their thoughts.
Since the server provide the user_id
to the client as they connect, this makes it easy for the client to filter out their own messages if required.
PACKETS
Client: ms_think#%
This packet is forwarded to the server whenever the player is starting to formulate a thought in the IC field.
Server: ms_think#{user_id}#{chr_id}[#{chr_folder_name}]#%
This packet is forwarded to all clients within the area at the discretion of the server, user_id
is a necessity to be able to reliably predict when a user timed out on their thoughts.
user_id
A unique user identifier, required by the client to keep track of users and their thoughts.
chr_id
The character id that the user has as of writing.
chr_folder_name
The folder of the last character the user has spoken with. If the user has changed characters (chr_id
) in-between, the server will not provide this argument until their next message was provided.
In the case of the sneaking mechanic, the server is left with the choice whatever to notify clients or not.
Server: ms_think_clear#{user_id}#%
This packet is forwarded to each clients whenever a user send a message to IC. This ensures that they are immediately cleared off the list even if they immediately started formulating new thoughts.