[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AW: [pygame] Network



On Tuesday 11 December 2001 01:07 pm, Jan Ekholm wrote:
> On Tue, 11 Dec 2001, DirkK wrote:
> >AFAIK the hard part of network programming is not setting up the sockets
> > and things like that, but the game logic concerning the connections:
> > keywords like time synchronisation, latency, interpolation come to mind. 
> > Does anyone know how these topics are solved in SDL?
>
> I don't think they are solved in pure SDL. There's an add-on SDL_net that
> probably has some nice solutions to something, but I couldn't find any
> docs without actually downloading the tar.gz. See:
>
> 	http://www.libsdl.org/projects/SDL_net/
>
> Maybe you can get some ideas by looking at the API?

SDL tries not to dictate the design of your application, rather, it provides 
low level API calls that you can use to get concrete results.

SDL_net is similar, in that it provides only a low level API for dealing with 
sockets in a consistant manner across different platforms. Synchronizing data 
between clients is an application design issue, so SDL_net avoids it.

SDL_net doesn't have anything that python doesn't already have, and I think 
the python implementation is more flexible as well.

So far in my experiments with networking code, I've tried a few client-server 
game models. It's tricky to get it to look smooth, and I think need to do 
more approximation and in-betweening on the client side.

If I get a chance this weekend, I'll post the code on my web site. It may be 
helpful, or it may not.

-- 
-Ray
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org