instructions for creating a 3rd party pygame module
pete shinners,  pete@shinners.org,  march 19, 2001
---------------------------------------------------

ok, the good news is that pygame has been setup so that 3rd
party modules can be installed and act as 'first class citizens'.
in other words, there's  nothing special happening in the core
pygame modules that your module can't also do.

getting your module going is actually a bit simpler that the
normal pygame modules, because it is assumed that other 3rd
party modules won't be including yours.

the best documentation/examples you will find are all inside
the pygame source. i can't think of too many things you'll want
to do that i haven't already done in the source. (at least while
you are getting started)

you'll want to change some of the metadata in the Setup file,
like author name, project name, etc, etc. you define all the
compile options inside the "Setup" file. it should be easy
enough for users to hand edit this file to get things compiling.


a couple special rules to remember:
(off the top of my head)

don't be freeing SDL objects on your own. most of them can
likely have many variables with references to that SDL object.

if your function takes a surface from a python argument and
wants to do anything to it, you must use some special functions
before/after use. if you just want to pass the function to SDL,
wrap the function call with PySurfacePrep/PySurfaceUnprep.
If your function is going to be doing pixel level access on the
SDL surface, wrap that code with PySurface_Lock/PySurfaceUnlock.
see the source for the surface object for full examples.

ask for help. if you're having trouble don't think twice about
getting the problems to me. i'll be glad to offer what i can.

