Official Forum for the HOMETOWN Minetest game server.

Local chat

If you've seen something awesome that we may enjoy on HOMETOWN... please let us know about it.
It would be useful to have a local chat. This would allow sending messages to other players within 100 block radius or so. Useful when doing something in an area with a few people as you could talk to them about it without spamming up the main chat.

ChimneySwift though that was a good idea and coded up a mod to do it. https://github.com/ChimneySwift/localized_chat
Sounds good to me
Emerald wrote:
Sat Mar 10, 2018 12:51 am
It would be useful to have a local chat. This would allow sending messages to other players within 100 block radius or so. Useful when doing something in an area with a few people as you could talk to them about it without spamming up the main chat.

ChimneySwift though that was a good idea and coded up a mod to do it. https://github.com/ChimneySwift/localized_chat
This feature was in the original chat3 when octacian first released it. Our chat3 was loosely based on his original code. We added the chatbell and tore out the "local chat" portion and then just rewrote it altogether.

We rejected the local chat code as we didn't want to scan each and every chat message for distances for every player logged on. That's a bunch of scanning that's more suited for CSM. But nothing much has changed with CSM and is only useful for the more "techie" players.
ExeterDad wrote:
Sat Mar 10, 2018 4:36 am
We rejected the local chat code as we didn't want to scan each and every chat message for distances for every player logged on. That's a bunch of scanning that's more suited for CSM. But nothing much has changed with CSM and is only useful for the more "techie" players.
True. I was considering how to optimize this, right now it'll only scan when you want to send a local chat message (by appending "[" to your message) however it gathers all objects within the (by default) 50 block radius and that could make it intensive to iterate over and check each one for players. I might make my own function which scans each online player's position instead. (or does chat3 do it this way?)

I don't really mind if it's added, but it might be useful and possibly result in a less clogged chat.
ChimneySwift wrote:
Sat Mar 10, 2018 5:14 am
I don't really mind if it's added, but it might be useful and possibly result in a less clogged chat.
Eh. If it would even be used at all. Somehow I feel like this wouldn't have many real uses.
What would be nice is a CSM to add a

Code: Select all

.pm <message>
command, which would then display a GUI to select one or more people. Might save time for long names. /me looks expectantly at self...
random_geek wrote:
Sat Mar 10, 2018 5:51 am
What would be nice is a CSM to add a

Code: Select all

.pm <message>
command, which would then display a GUI to select one or more people. Might save time for long names. /me looks expectantly at self...
I made something similar to this without the GUI, but the message limit resulted in group PMs being limited to the number of messages per second without adding delays and stuff.
huh. you mean i could write a CSM that could filter messages from players... even by their actual location... sounds like too much information being passed to the client... stalking etc would be possible...


but the idea of having groups would be what i would go for. with basic commands like
/join <groupname> // also creates it if empty
/leave // destroys group if empty afterwards
/global <msg to outside of group>
/showglobal
/hideglobal
any other normal message would end automatically in the group you are in.

that way you could join a group, talk there with your friends that are in the same group and if you want to say something public you would use /global <bla>...
different color for the group and global would also make it easy to see all of it...
Bob8881 wrote:
Sat Mar 10, 2018 7:37 am
huh. you mean i could write a CSM that could filter messages from players... even by their actual location... sounds like too much information being passed to the client... stalking etc would be possible...
Since player objects are rendered clientside (including nametags) their position and name is accessible by the client, but not to CSM as of now, you'd have to modify the C or whatever.
Interesting, I had a similar idea for my own server (which I never finished due to unrelated reasons). In fact I was actually considering having local chat by default, and global chat required a command and a special privilege. I thought that this would add an interesting dynamic to the game because conversing with other players would require being in a similar location, more like in the real world. Although to be honest I wasn't sure if it would work too well or if players would just end up nagging to be granted the global chat privilege.
ChimneySwift wrote:
Sat Mar 10, 2018 8:17 am
Bob8881 wrote:
Sat Mar 10, 2018 7:37 am
huh. you mean i could write a CSM that could filter messages from players... even by their actual location... sounds like too much information being passed to the client... stalking etc would be possible...
Since player objects are rendered clientside (including nametags) their position and name is accessible by the client, but not to CSM as of now, you'd have to modify the C or whatever.
This wouldn't work on other servers but actually would work on this server because on this server "minetest.get_player_names" returns only the players that are actually visible (notice that on this server nametags are hidden beyond a certain distance - I have no idea how this is implemented without the player join and leave messages appearing in the client's chat but it does affect the CSM function).

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 23 on Wed Mar 14, 2018 2:43 am

Users browsing this forum: No registered users and 1 guest