[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Pygame to C/C++?
Michael wrote:
I'm thinking of rewriting some of my Python/Pygame code into C (or C++?)
with SDL to get a speed improvement. I haven't written anything in C/C++
in a long time but think I could pick it back up. Does anyone have any
tutorials of rewriting that kind of thing?
Good luck on this. There hasn't been a lot of experimentation on this sort
of thing. I'm sure other besides myself are interested in seeing what kind
of results you will get.
Pygame functions have an almost 1-to-1 mapping to SDL functions, so porting
shouldn't be too confusing. Pygame also comes with a C-api so you can get at
the main "glue" code from the C end. It's not really well documented, but
you can look at some of the pygame source itself for reference.