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

[pygame] Python extension coded.



OK, it may be trivial, but for me it's really enjoyable to have my first
C code interacting with a pygame program. This is a very helpful tool for
most action-packed, graphic-intensive games:

http://www.geocities.com/pupitetris/Code/3d-demo_20030329.tgz

That's some sample code. I coded my own special blitting function. I don't
have any profiling results yet, but you can perceive the improvement from
the pure python version. My function is really primitive, but it works.

Another solution was to use Numeric, and I tried first with it, but it
seems like it takes quite some practice to find the correct interactions
and slizings to get things done with it (Numeric has a very funny
"phrasing", you may say). At least I learned how it works and did some
interesting exercises.

After unpacking, run in the 3d-demo directory './setup.py build' and then
copy the file in build/lib*/*.so to the 3d-demo directory and then run
3d-demo.py.

Old version:

http://www.geocities.com/pupitetris/Code/3d-demo_20030108.tgz

The python.org documentation was all I needed to get this thing done. It's
all there.

I wish I could work on this every day.

Greetings,
Arturo