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

Re: [pygame] Soc: Pygame on ctypes



On 5/1/06, Alex Holkner <aholkner@xxxxxxxxxxxxxx> wrote:
There was some talk on the list earlier this year about rewriting Pygame
to use ctypes.  I've been thinking about applying to do this for Soc
2006.  There's a little more info on the why and what at
http://wiki.python.org/moin/CodingProjectIdeas/PygameOnCtypes.

My approach would be to wrap SDL with ctypes, then reimplement the
Pygame API in pure python as much as possible.  For the parts of Pygame
that are not simple wrappers around SDL functions, these would be
initially implemented in straight python, then later (if needed) written
again as an external c module also wrapped with ctypes.

I already have a hacked-up ctypes wrapper around SDL (though needs much
improvement).  It's unlikely I'd be able to reimplement all of Pygame
within the Soc period, so I'd focus on the video, surface and event
modules first.

I would like to know firstly if anyone else is already doing, or
thinking of doing this, so I don't step on your toes.  Also, some
collaboration with Simon's networking project would obviously be
useful.  Any other thoughts?

Excellent.

Pete has mentioned that he prefers a 1 to 1 binding to SDL libraries,
with higher level pygame functionality built on top of that.

SDL_sound might also replace SDL_mixer, and SDL_gfx could potentially
replace the pygame drawing routines.

-Sw.