On 2010.5.18 10:26 PM, Alex Hall wrote:
Hi all,
Before I continue into the strange world of pretty graphics, I want to
check that Pygame can support some sort of online multi-player
implementation. I expect no more than two players at a time. Is it
Is this possible? If so, how (as in where do I want to look)? If not,
is there another library, maybe even one that would tie into pygame,
that would let me do this? Thanks!
The Mastermind library is probably better developed, but you're also
welcome to use my own module Toomi:
http://kschnee.xepher.net/code/sockets/toomi.py.txt
It's built using the tutorial at http://www.amk.ca/python/howto/sockets/ .
One question for others: I'm finding that even though I'm using the
socket.select function to make sure a socket has data waiting, I can't
seem to transmit large amounts of data (more than around 5 KB) without
one side or the other hanging. (I'll have to look at the code more
closely later to be more specific.) Any suggestions? My goal was to have
a server part of my program run independently from both the player
clients and a display client, but this bug seems to force me to develop
some annoying protocol for things like sending a list of objects.
"Prepare for N sending rounds on data for N objects..." rather than
"here's the complete list of objects and their data all at once."