[C++-sig] Embedding Python and the Game Institute
Brian Hall
bhall at gamers-fix.com
Sat Jul 10 21:43:55 CEST 2004
Hello All,
Im currently in the process of extending my current course at the Game
Institute (www.gameinstitute.com) to include scripting engines for games.
Im wanting to use Boost.Python to do the job, but Im running into some
problems and I am under a tight time budget. I was wondering if any of you
could help point me in the right direction for what Im trying to accomplish
as this would help get an actual course out there for people to somewhat
learn to use Boost.Python in their own little games they are writing. Any
help any of you could provide would be much appreciated.
Let me start with a quick overview of what Im trying to accomplish
I have a state machine demo where the user is able to add new states to
their state machine. They can attach actions to these states, which are
each executed when the machine is in the state. The states also have
transitions attached to them which are evaluated to determine if the machine
should transition into the transitions target state. Simple stuff.
The tricky bit comes in when the user wants to add a scripted action which
will be python script. The way I wanted to have it work was I was going to
have the user derive the python action class directly from the C++ action
class. Same with the transitions. The catch is they can change these
scripts at any time, as well as add new transitions and actions at any time
so Im trying to figure out how to update the instances of the python
objects the user would be mucking with
Incidentally I have no problems falling back onto the python C API if I have
to, I dont expect Boost.Python to do it all for me
Im just needing a
little help connecting the dots
Thanks in advance for any help you can provide!
Brian Hall
Instructor
Game Institute
More information about the Cplusplus-sig
mailing list