Jump to content
  • Advertisement
Sign in to follow this  
Jompe71

2 player head-to-head architechture question.

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

Hi, If I wanna implement a 2 player head-to-head feature in a game how do I set it up. Criterias must be that no middleware server exists, the two clients talk directly to each other. My main question is if they both act klient AND server so that the communication goes both ways indepandant or if a simple one way is enough ? In a) a klient sends data when nesseseary, but really doesn't care about the respons. In b) a klient sends data periodically and the server response holds info about the other klient. Please enlight me with your wisdom, whats the best approach? ;)

Share this post


Link to post
Share on other sites
Advertisement
The best approach would be to make one of the clients the server. This allows an authoritative state. You could delay the server response to the host to make it give no advantage. Making both the clients authoritative over the game states would server no purpose.

Share this post


Link to post
Share on other sites
The biggest problem with not requiring an introducer is that at least one of the clients (call it the "host") *must* set up port forwarding for it to work (or have a public IP address).

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!