So if I'm understanding correctly, you already have a lua-interpreter set up that allows the objects in your game to move? If so I think you've got the most challenging part down :D
Creating blocks that generate Lua should be pretty easy from here. First of all you'll want to check out the docs on
generating code. Anywhere it references Blockly.JavaScript, just replace that with Blockly.Lua.
For example if you have a block that looks like this:
With the block definition:
```
{
"type": "turn_degrees",
"message0": "turn %1 degrees",
"args0": [
{
"type": "input_value",
"name": "DEGREES"
}
],
"inputsInline": true,
"colour": 230,
}
```
Your code generator might look like:
```
Blockly.Lua['turn_degrees'] = function(block) {
var degrees = Blockly.Lua.valueToCode(block, 'DEGREES', Blockly.Lua.ORDER_ATOMIC);
var code = 'turnAngle = ' + degrees + \n';
return code;
};
```
That sounds super cool! If you ever have updates/publish be sure to post about it here! I'd love updates on this project :D
I hope that helps! If you have any further questions please reply!
--Beka