I'm working on a game where the player writes some basic AI that plays "instead of" him. So an algorithm written by the user must be executable right after he saves it.
The game is written in C++ using Qt framework.
I don't want to scare players with programming so I want to provide them some easy drag'n'drop visual programming editor (like in this CodeSpells game). Blockly looks like exactly what I wanted since it can generate Lua scripts that can be used/executed in C++ code (I need to learn more about this, but that's not for this question).
What I don't know is how to create/integrate this editor in C++. Their documentation says only about web, android and ios.
So my question is: how to integrate Blockly editor to a C++ project?
EDIT :
I wrote to CodeSpells devs. This is the important part of answer:
"For CodeSpells, we used a product called CoherentUI -- which is for Unity. For subsequent projects, we've been using the cheaper Unity product: https://www.assetstore.unity3d.com/en/#!/content/55459"
Can the Blockly editor be integrated in a Qt C++ project using embedded browse? For example like this? (I never worked with it)
So, this can be done using embedded browser. I saved Blockly web editor in resources. Then I used QWebEngineView to display editor from resources.
Here is similar tutorial.