Welcome to the Builder Academy

Question Intermud Grapevine Chat support

More
16 Jul 2019 23:34 #8417 by Blizzard
Thanks for the advice. I'll implement the queue approach. That function was probably leftover from the example code I started with haha. For now, mutex locking the entire game loop doesn't seem to cause any problems but that sounds cleaner. I think I'll process it even when sleeping so the game still shows as online on the Grapevine site. Most other implementations do this. This project has delved into a lot of coding areas I've never worked with before. :)

Please Log in or Create an account to join the conversation.

More
17 Jul 2019 21:30 #8418 by Blizzard
I've got the queue approach implemented and updated the documentation on it. I've decided to go with disconnecting from Grapevine when sleeping and then reconnecting as I don't see any other way to do it without changing major stuff like replacing select sleep with something else. The gvtell crash is also fixed. Latest code uploaded to github.com/halimcme/worldofpain with integration docs updated in GRAPEVINE.md, with the comm.c changes being the major things needed.

Welcome for feedback on any other bugs, suggestions or improvements. I might eventually put in things like fancy formatting, colors and paging but I want the core of this stable first.

Please Log in or Create an account to join the conversation.

More
18 Jul 2019 01:56 #8419 by Vodur
Nice, looks solid. Good call on queuing the log messages too, I didn't think about that.

Please Log in or Create an account to join the conversation.

More
21 Jul 2019 08:05 #8420 by Blizzard
I just posted an update to the code.

I've removed the Guid object and gvMessage string from char_data and implemented an action map in the GvChat class that stores guids and associated players and messages. I am using a char_data pointer in the map, but I added a function to remove all actions for a player if they sign out or otherwise get extracted.

I also added color support to most functions, and moved where the log queue gets processed to the start of the game loop. GRAPEVINE.md has been updated with current details.

Please Log in or Create an account to join the conversation.

More
24 Jul 2019 10:06 #8421 by Blizzard
Forgot to mention, I also added support for Grapevine heartbeats while sleeping, making the GvChat class aware of when the mud is sleeping or not and responding differently based on that. I also moved processing of the log queue to the beginning of the game loop.

Please Log in or Create an account to join the conversation.

Time to create page: 0.201 seconds