Jump to content
  • Advertisement
Sign in to follow this  
mpardalos

Synchronous vs Asynchronous networking

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

Recently I decided to make a simple multiplayer game just to get my feet wet in network programming. I am using python and the problem I have is with what type of networking library to use. My two options are probably python's own socketserver library and twisted. So my question is: is synchronous (socket - socketserver) or asynchronous(twisted) networking better suited for games?

Edited by mpardalos

Share this post


Link to post
Share on other sites
Advertisement

Depends on the game.

 

Are you okay with waiting for the data to come across the wire? A game like chess or a hobby connect 4 clone, it doesn't really matter if the game is blocked for two seconds waiting for your opponent's data. There is not much for the client to do.  Other turn-based games might also be just fine stalling for anything from milliseconds to minutes.

 

Interactive games, where players are constantly changing things, you really must have asynchronous systems. In these games, a slow network packet should not make the rest of your game stutter.  Imagine playing an action game with the engine blocking for normal network delays and jitter, it would likely drive the players crazy. 

 

Asynchronous adds a bit of complexity, but if your game is interactive and it needs it, then it needs it and you pay the extra costs.

Edited by frob

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!