Re: 2-player game, client and server at localhost

2005-08-03 Thread Christopher Subich
Michael Rybak wrote: > As stated above, that's how I'm trying it right now. Still, if doing > it turn-base, I would have to create a new thread every time. >I have some other questions though - please see below. No, you should never need to create a new thread upon receiving input. What you

Re: 2-player game, client and server at localhost

2005-08-02 Thread Christopher Subich
Michael Rybak wrote: > CS> There's the key. How are you processing network input, specifically > CS> retrieving it from the socket? > > A "sock" class has a socket with 0.1 timeout, and every time I > want anything, I call it's read_command() method until it returns > anything. read_command(

Re: 2-player game, client and server at localhost

2005-08-02 Thread Christopher Subich
Michael Rybak wrote: > That's the problem - "or a player input comes in". As I've explained, > this happens a dozen of times per second :(. I've even tried not > checking for player's input after every frame, but do it 3 times more > rare (if framecount % 3 == 0 : process_players_input()). Well, I

Re: 2-player game, client and server at localhost

2005-07-30 Thread Peter Hansen
Michael Rybak wrote: > I'm writing a 2-players game that should support network mode. I'm now > testing it on 1 PC since I don't have 2. I directly use sockets, and > both client and server do computations, the only data transfered is > user mouse/kbd input. > > It works synchronously, but