I have been running into problems recently where the client-side of a networking game never read/recognizes the server. When I tried to use the socket module the client never accepts the socket. I used a module called NetworkZero, but that never returned more than None when I used .discover(). I have no idea what the problem is. Any ideas are appreciated
1 Answer
There are many ways to set up an interface between clients and servers.
The easiest is probably to start with HTTP especially in Python where you can just use requests and poll for your data.
This will get you to prototyping quickly and then you can put your focus into optimizing when you start running into issues.
Of course this may be a less than optimal solution depending upon the nature of your game. Without context I would recommend using simple client/server communication systems you understand.
-
How would I go about using HTTP I am experienced with python but very new to all of the network-y multiplayer things. Thanks!– SundyAgoCommented Jul 12, 2020 at 3:05
-
-
Oh well if you do not have HTTP experience then the library you chose will be easier to get started with. Make sure you are discovering the same name as you are advertising. Here is the link to advertise in the docs. Commented Jul 12, 2020 at 3:20
-
I deleted that other comment as HTTP is a lot to learn just to get started sending data over the wire. Though if you want to use it I suggest using Flask for the server and Requests for the client. Commented Jul 12, 2020 at 3:22
-
I played around with these commands, and I was wondering if it would be possible to use 3-4 machines/processes to send and receive data in between them– SundyAgoCommented Jul 12, 2020 at 3:30