Engine Python Scripting Interface

My first development task was to add a scripting interface to the engine. This allows the game logic to be separated from the engine code and loaded in as with any other asset such as a sprite or audio clip.

I chose Python for scripting due to its power, flexibility, popularity and ease of integration. I am using IronPython for the .NET support with XNA, but I am being careful not to introduce any .NET dependencies as the engine needs to be portable, and game scripts should be able to be run with any version of the engine. The script itself is loaded during initialisation of a “script harness” executable, which is the framework under which the game runs in the engine. The engine can of course still be used directly by coding natively in XNA and using the engine assembly as a library.



Links