Using lua script to control sprite movement
Commands SetXY(x,y) -- set position to (x,y) F(x) -- move forward x pixel B(x) -- move back x pixel R(x) -- turn right x degree L(x) -- turn left x degree
The lua vm was reference from lua.vm.js
Since javascript did not support coroutine, I used lua script in C2. It could call c2 function in lus script in my lua vm plugin.
Develop games in your browser. Powerful, performant & highly capable.
very cool; can be very useful if used with AJAX, to script cutscenes