Archived

This topic is now archived and is closed to further replies.

Server querying in client/server game

This topic is 5241 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have written the basics of my network code, with actions being passed from the client to the server and the server returning state changes to the client. Both currently have a message queue and processing loop. This all seems to work pretty well, but now I need the client to query the server for certain information (inventory lists, trade confirmation etc. for UI display). What is the best way of doing this without interrupting the flow of the game (ie, the game still needs to run unaffected in the background)? I thought I could have a message for querying, and a message that the server passes back with the values but then my trade accept code (for example) is fragmented. Or, I could have the client query the server and wait for the response but then I am stuck inside my message loop and so the game stops until the list is retrieved. Any help on how this is best handled would be appreciated. Thanks all! Rael [edited by - Raeldor on August 12, 2003 11:44:53 PM]

Share this post


Link to post
Share on other sites