Jump to content
  • Advertisement

Archived

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

stefu

Polling in DP8?

This topic is 6194 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

Hello, I use DP8 for networking. Some events like loading track and cars mustn''t be done in DP message handler because they take few seconds, so I have to save the message and process it at the beginning of frame in main thread. They also write in DP8 SDK samples that any time consuming shouldn''t be done in DP message handler. So I thought that it would be ok to use polling method at the beginning of the frame. This is also my first networking app and I''ve faced some problems using multiple threads. How is the polling system best done in DP8?

Share this post


Link to post
Share on other sites
Advertisement
For optimal performance you need a circular message queue for incoming messages, and then you empty and handle all the messages in the queue, say, every 50ms from the main game thread.

Magmai Kai Holmlor
- Not For Rent

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!