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

Re: [pygame] Mixing Python and C in games



Hi Sami

Maybe you can remember me, didn't know you are also here. You were so kind to send me a function (in Python) that allows to transform a rectangle/square into a Trapezoid. In between I found a coder who translated into C. So if you or anyone in here could need/use it, just lemme know.
In my case I use it for transforming floor/roof tiles into depth for getting a deep effect for a 2D dungeon system.
Next to the C code I got a compiled version for Windows, Mac and Linux (all tested and working) with the latest Python (2.x) and Pygame (1.7.x) versions.


Regards
Farai


Am 17.02.2006 um 15:17 schrieb Sami Hangaslammi:

On 2/17/06, Toni Alatalo <antont@xxxxxxxxxxxxx> wrote:
that i dont know. if pyrex was perfect, would it not you just do the normal
set([1,2,3]) - other_set ..business and generate those to the equivalent PyC
function calls?

My understanding is that Pyrex does not do this yet. I'd love to be wrong, though (I mean it generates the PyObject_ calls, sure, but that probably has quite a lot of overhead compared to using PyDict et al directly).

there are two pyrex-written python opengl engines, you know? soya3d and
spineless.. soya3d goes i think even too far in writing everything in pyrex,
on the one hand things like SDL (it does not use pygame), but even
Shape.Get() implementation that can open blender to convert a .blend to
soya-data first.. spineless is much different, uses pygame for sdl and
implements more things in py, and just some things in pyrex. soya3d is
complete, spineless incomplete and even abandoned? but nicer code afaik.

Thanks! I'll take a look at Spineless and Soya sources.

--
Sami Hangaslammi