[quake3] Python game code

LinuxManMikeC linuxmanmikec at gmail.com
Tue Nov 21 18:33:23 EST 2006


On 11/21/06, Thilo Schulz <arny at ats.s.bawue.de> wrote:
> On Tuesday 21 November 2006 18:34, Neil Toronto wrote:
> > As long as I'm writing, I'll give a status update. :D I've got the
> > engine loading Python files and using them as entry points now. (You set
> > vm_cgame and friends to 3.) It can call them to initialize the game,
> > render frames, etc. -  not that the Python game does anything right now
> > - and it receives return values. One especially nice thing is that
> > Python can use zip files in its system path, so the first thing it does
> > after initializing the interpreter is add the engine's search path to
> > sys.path. When a Python game file does something like "import cengine"
> > (the client engine wrapper), the interpreter loads cengine.py from
> > baseq3/pygame.pk3 (or an overriding file).
>
> Looks pretty neat. Someone who wanted to use this will have to write the mod
> code all over again, though. Isn't that a bit large task to do compared to
> actually get python stuff running?
>
> --
> Thilo Schulz
>
>
>

Well I think this binding was meant for non-programmers who want to
mod the engine, but this brings up a question that I've had since I
first read this thread...  Wouldn't it be possible to mix C and
Python?  What would interest me is using Python for scripting
character AI and other things that could be changed between maps in a
game (like in Star Trek Elite Force and Call of Duty).  I would prefer
to do the rest of the more common code in C for speed.  I know you can
mix C and Python, but the design of this binding would decide how hard
it would be to implement (I would imagine).  Please consider this in
your design Neil.

Mike Cerveny



More information about the quake3 mailing list