Phython as In-Game scripting language

Nick Trout nick at spam_me_notvideosystem.co.uk
Fri Feb 25 06:16:46 EST 2000


> Just so I understand (and also because my
> programmer teammates are asking me questions), is
> unmodified (no stackless or microthreads) Python
> unable to run multiple scripts at the same time?

There are a number of ways you can run multiple scripts I think.

* See threading.py (in python Lib)
* exec "<code>" in global,local which global and local are 2 state dictionaries.
Global persists for all objects and each object will have its own local(?). You
should be able to compile some code and just execute it to save the compile
overhead.
* Initialise multiple Python states in C (not sure how stable this is) and
execute scripts.

> I'm thinking no because if Python was able to run
> multiple scripts simultaneously, there
> wouldn't be a need for SP or MT's.

Don't quote me but I think SP was written for restricted memory systems. To be
honest I dont see the necessity for MT. Could someone expand for my benefit?!!
:-)

What sort of game are you writing? First person shooter on PC?





More information about the Python-list mailing list