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

Re: [pygame] using opengl in pygame?



On Mon, 28 Jun 2004, Jasper Phillips wrote:

>
>On Mon, 28 Jun 2004, Jan Ekholm wrote:
>
>> On Thu, 24 Jun 2004, Jasper Phillips wrote:
>>
>> >For networking I use Twisted, which works nicely.  I've stumbled across a
>> >couple of bugs, but it's good stuff.  Certainly worlds better than socket
>> >programming!
>>
>> I had a look at Twisted a few years ago when thinking about what to use,
>> but at least back then it was an undocumented mess. I still think the
>> documentation is severely lacking.  A Python library that has "use the
>> source, Luke!" type of documentation isn't worth looking at.
>
>I actually think the documentation is fairly good for a complex and evolving
>project, and an open source one to boot.  None of the LGPL libraries I'm
>using have better docs.

Must have been greatly improved since i last looked at it then. Which is
good.

>> I also didn't like the way one had to go the full Twisted way and give it
>> full control over the application loop, but that is hopefully just FUD
>> nowadays.
>
>I absolutely disagree here.
>
>The alternative is some sort of polling and/or threaded solution, which IMHO
>would be a grave mistake.  Their event driven model is much cleaner and more
>scalable, even though it requires an outer application loop.  Moreover you
>can easily insert anything you like into this loop (or time slice it into
>your own loop), so IMHO there is no drawback to this; e.g. it only took me 4
>lines of completely isolated code -- equivalent to writing my own loop.
>Well worth the payoff.

Well, I'm used to doing stuff "the Pygame way", ie wait for an event from
the user or a timer being fired off. Would maybe not be too much work to
use Twisted, but I don't really see the point of dragging in all the
Twisted bloat into something that works well. Such a radical change is
anyway bound to introduce some bugs and problems that need a lot of
workaround code to fix.

>Besides, what other alternative is there?  Python's socket module?!

Sure. And some threads. Works well enough I think. At least I haven't had
any problems for ages.

-- 
    There were no public health laws in Ankh-Morpork. It would be like
                installing smoke detectors in Hell.
                                            -- Terry Pratchett, Feet of Clay