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

Re: [pygame] from Python+Pygame to C+SDL, Any experiences?



On Tue, 18 Mar 2003, campbell barton wrote:
> I have been using python and pygame for a little while now and think I
> could move on to C & SDL, The main reason for this is that I would like
> access to a wider variety of libs (Libart and misc audio/midi)
> 
> Has anyone on this list used Pygame to learn and then moved to C and
> sdl, and if so what was it like? is it worth it.

I actually did it the other way around. I programmed simple games using C 
+ Allegro before moving into Python a couple of years ago. And now that 
I've experienced the bliss that is Python+Pygame+PyOpenGL, there is NO WAY 
I'm going back to coding games in pure C (except maybe if I get paid).

Programming in C+SDL after Pygame is going to be extremely frustrating. In
my opinion, a much better idea is to continue using Pygame and wrap the
additional libraries with Pyrex
(http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/). Generating
wrappers for existing C libraries is really easy with Pyrex, and you can
also use it to speed up your game by writing the most time critical
functions in C/Pyrex.

--
Sami Hangaslammi