Welcome to the Builder Academy

Question GUI for TBAmud

More
04 Dec 2017 23:09 #7203 by WhiskyTest
Replied by WhiskyTest on topic GUI for TBAmud
There are a couple of instances you'd want immediate updates sent to the client, so splitting the relevant portion out into a function is helpful. Otherwise you'd be calling the whole msdp_update() unnecessarily.

For AFFECTS it probably isn't as important. But take, for example, map data like ROOM_VNUM.
Code:
Example: You move north and immediately you are in VNUM 100, "Main Street". After one second msdp_update() fires and sends the new data to your Mud Client. Your mapper updates and is happy. Next you quickly move north, north, north. You are in VNUM 103, "Third Street" (boring Mud, I know) Because msdp_update() is firing every second, your Mud Client doesn't know about 101 or 102 because you went through them so fast.
In this case you'd want to call the function to refresh the msdp data for exits whenever the char_to_room() function is called.

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

More
04 Dec 2017 23:33 - 04 Dec 2017 23:37 #7204 by krell
Replied by krell on topic GUI for TBAmud
I don't know why you're telling me this. I have separate functions to create my tables and returns the values to msdp_update(). What's going on that I'm missing?

Addendum

Oh nvm, I think I see what you're saying. You're explaining why the function would return directly to the client and not the msdp_update() function. Got it.
Last edit: 04 Dec 2017 23:37 by krell.

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

More
04 Dec 2017 23:49 #7205 by Ornir
Replied by Ornir on topic GUI for TBAmud
The important part is:

MSDPSetArray(ch->desc, eMSDP_AFFECTS, msdp_buffer);

This adds a copy of msdp_buffer to the msdp buffer internal to the protocol snippet. At this point the work is done and the next time msdp_update() runs the data is sent. Alternatively You can flush as described above and the data is sent immediately.

No strings to return, nothing to free, life is good and I still have my hair!

Luminari - a Pathfinder/D&D inspired adventure!
www.luminarimud.com
luminarimud.com 4100

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

More
07 Dec 2017 13:51 #7213 by Sascha
Replied by Sascha on topic GUI for TBAmud
Hey Whiskey,

I responded to your post over on my boards regarding the GUI setup/implementation. Just wanted to call your attention to it. Thanks!

Will you stand against the coming Storm? After the Breaking: STORMRIDERS MUD - atbmud.dune.net port 4000

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

Time to create page: 0.176 seconds