[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Networking?



On Wed, 21 Nov 2007, David wrote:
> 1)  Use Twisted with reactor.iterate

I found that this approach has quite a high impact (ie. takes a considerable 
amount of time to run, even when there's no network events).


> 2) Use the Twisted reactor *as* your main loop, and implement all game
> logic as call-backs from there. This is the approach that the Twisted
> people will recommend.

This is also useless for highly interactive games.


>  3) Run the Twisted reactor in its own thread

This is probably the only reasonable approach for games.


> 5)  Run the Twisted reactor in its own process, and use pipes or sockets to
> pass data between
> it and the main loop/process.  This has the merit of using the OS's CPU
> allocation management
> rather than that of Python's thread manager.

Quite difficult to manage on Windows.


     Richard