[quake3] Python game code
Neil Toronto
ntoronto at cs.byu.edu
Tue Nov 21 18:35:32 EST 2006
Thilo Schulz 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?
Very perceptive, young Skywalker. Rewriting the game code *is* the
largest task. I'm going to do that while I code up the wrapper -
basically wrap functions as I need them.
Neil
More information about the quake3
mailing list