rnodal
October 10th, 2008, 03:42 AM
Hello all:
One of the goal of my game engine is to allow the developer to write certain part of the game via a script because of of the obvious benefits of interpreted code over compiled code. I chose python to be the scripting language that I would like to support (at least the first one :)). So my question is what ways (or way) do you recommend for this. I know that you can extend Python by writing a C module but in that case the main program still the Python interpreter. I do not want it that way. I want the C/C++ program to be the main one. I have started to read from the the Python documentation and it seems that the way to go is to embed the Python interpreter into the C/C++ application. Since I have not read much I was wondering if you could help get a head start from what you have experienced. A quick note, I would like to release my engine under LGPL so how does embeding the interpreter into my application will affect that? Thanks all for your time.
-r
One of the goal of my game engine is to allow the developer to write certain part of the game via a script because of of the obvious benefits of interpreted code over compiled code. I chose python to be the scripting language that I would like to support (at least the first one :)). So my question is what ways (or way) do you recommend for this. I know that you can extend Python by writing a C module but in that case the main program still the Python interpreter. I do not want it that way. I want the C/C++ program to be the main one. I have started to read from the the Python documentation and it seems that the way to go is to embed the Python interpreter into the C/C++ application. Since I have not read much I was wondering if you could help get a head start from what you have experienced. A quick note, I would like to release my engine under LGPL so how does embeding the interpreter into my application will affect that? Thanks all for your time.
-r