Hi !
So I was thinking how to make to tools to help game making and debuging.
This project is based on the Lua console from FRex (
http://en.sfml-dev.org/forums/index.php?topic=15962), and its purpose is to be a python shell within SFML that will also automatically be linked with game objects for debugging / inspection etc.
How does it work?- user creates a swig wrapper file telling swig what objects are to be exported from C++ to python (for instance, "Player" class, etc)
- a specific project is dedicated to building the python module (.pyd file) generated by swig, which exposes the game objects
- within the actual SFML game, I use the Python C Api to do several things. A python shell is loaded and is bound to the SFML Console for rendering and input, then the previous pyd module is imported so the shell has the knowledge of some C++ classes within Python. From the SFML app, the user can specify which instances of game objects can be in scope within the python shell. For insance in the picture I put the instance named "pl" of a C++ "Player" class, into the global python objects, so the C++ object can be directly manipulated through the python console
limitationsdue to the input format of the console it's not really possible to input multi-line strings and tabulations, which is pretty bad since the scripting language is python. So it's not really possible to input new functions in the shell
I'll post the source code later if anyone is interested