I am building a simple 2D game (for learning purposes) in c++ and am currently parsing XML files using TinyXML to load my textures and other resources. Recently, however, I have been intrigued by python and wish to use python instead of XML for various reasons(once again, for learning purposes).
I was wondering if I could translate my objects in XML into a large tuple in python, and then by using an embedded python interpreter parse the elements of the tuple and extract the data into my C++ game.
Mount and Blade Warband (A game that first introduced me to Python modules) seems to do it this way, and has sparked my interest.
Here is an example of the first two elements in a large tuple for Mount and Blade....
sounds = [
("click", sf_2d|sf_vol_3,["drum_3.ogg"]),
("tutorial_1", sf_2d|sf_vol_7,["tutorial_1.ogg"]),
However, Mount and Blade requires you run an executable on these python scripts which translates them into large .txt files...
drum_3.ogg 769
tutorial_1.ogg 1793
Which leads me to believe that the game is actually parsing these text files.
Is what I attempt to do still possible?
I have searched around for some APIs and have found a few good ones, predominately Python/C or Boost.Python and was hoping someone may be able to give me some direction.
Thank you very much and any input is greatly appreciated!