Jump to content
  • Advertisement
Sign in to follow this  
nixon

My first online Managed DirectX game

This topic is 4120 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'm making my first turn-based game in C#. Im using the lidgren network library: http://code.google.com/p/lidgren-library-network/ Im a little puzzled about what's the best way to process incoming network messages. My idea is to let 2 threads handle the network (one for listening - one for sending messages) and make a thread pool that I use to process each network message or request that I get. There is a question how big this thread pool should be and if I need some kind of locking mechanism (mutex) to allow only one thread at a time to be allowed access my game's ruleset. Would you recommend doing this any differently?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Can anybody please help me!!

I would be very thankful :)

Share this post


Link to post
Share on other sites
I've been thinking.

Isn't it better for the server to put incoming requests in a queue? (instead of using multiple threads)?

Share this post


Link to post
Share on other sites
I would recommend against threading and just use an application loop, polling messages and handling them as they arrive. Also; posting in the network or .net forum would probably give more answers.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!