Ivan Illarionov <[email protected]>:
> WESNOTH REFACTORING AND FUTURE DIRECTION PLAN
>
> 1. Disable current Python AI code and add new integrated Python interpreter
> in a form of C++ class.
> Proof of concept: http://github.com/ii/wesnoth/tree/master/src/wespython.hpp
> Python will be re-enabled on top of new interpreter and new bindings.
> The limited scope of the current interpreter don't allow to use it,
> unfortunately.
>
> 2. Add --python or similar option to wesnoth executable which activates
> the new interpreter and redirects the execution to the GameController object
> written in Python. This object exists as PyObject* pointer inside C++ and
> it is created by PyImport_Import/PyObject_GetAttrString/PyObject_CallObject
> Python/C API calls.
>
> During refactoring phase which could take some time new changes will be
> visible
> only with this option the same way --new-widgets option works now.
>
> 3. GameController object will do the same job as the current game_controller
> C++ class but with a twist:
>
> Game is separated into several "modules": each module is a Python package with
> WML config files.
>
> By default "titlescreen" module is loaded, --test and --campaign options will
> run the "game" module bypassing the title screen. Pressing the buttons on the
> title screen will load required modules like "game" or "editor".
>
> 4. All game would be converted to these python modules step by step by
> exposing
> all C++ functionality to Python. Majority of exising C++ code will be re-used
> in a form of Python extensions.
>
> 5. After the conversion is finished it would simply become the default mode.
>
> Ivan Illarionov
This looks like a decent start on a plan, and very much the sort of thing
that can be done on a branch. I'd like to see a round of questions from
other core devs, and *answers* to those questions, before we create the branch
and go forward from there.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
_______________________________________________
Wesnoth-dev mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-dev