[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Example: Simple client and server
I mean like how would one use it? For example, with this brilliant code, could one send signals to another computer and vice-versa, like:
computer 1 computer 2
[sends]"Hi Comp 1" [receives][returns:]"Hi Comp 2"
[receives][returns:]"How are you?" [receives][returns:]"I'm fine."
[receives][returns:]"Good, me too." [receives][returns:]"Excellent."
[receives][returns:]"Except the bug" [receives][returns:]"huh?"
[receives][returns:]"I got sick" [receives][returns:]"I see you're better now though!"
[receives][returns:]"I got over it." [receives][returns:]"Like I said, so I noticed."
[receives][returns:]"Perceptive." [receives][returns:]"Yep. Opps!"
[receives][returns:]"What?" [receives][returns:]"I've got to go play tetris"
[receives][returns:]"And leave?" [receives][returns:]"The kids are making me."
[receives][returns:]"OK" [receives][returns:]"Bye."
[receives][returns:]"Bye."
The idea here is to make a 2 player game where data is constantly exchanged, and the computers act on the data from the other computer. I'm hoping this can do that?
Ian