openage icon indicating copy to clipboard operation
openage copied to clipboard

Add Python plus C++ demo example documentation

Open TheJJ opened this issue 4 years ago • 2 comments

When one wants to use arguments in a C++ demo, the best variant is to use Python and then call to C++.

We should document in doc/code/testing.md with a very simple example how this can be done.

A practical existing example is in openage/renderer/, which calls to libopenage/renderer/tests.cpp::renderer_demo.

So in short: update the testing documentation how to do a C++ demo with Python argparsing.

TheJJ avatar May 08 '20 12:05 TheJJ

I would like to contribute and have some experience with pybind11. I know python quite well but I hope to improve my C++ with participating in this project. However I dont understand what you mean with demo. Could you elaborate?

VietTralala avatar May 17 '20 12:05 VietTralala

We already have a C++-Python interface (in libopenage/pyinterface and openage/cppinterface) :)

I should have explained that more, sorry: openage "demos" are interactive tests, which can be used to play around with various parts of the engine without launching the main game. This is useful for developing new features separately and to integrate them, without running/needing the whole game engine. See here.

TheJJ avatar May 17 '20 19:05 TheJJ