Pure C # Writing, interpretation of execution, syntax similar to JS, dynamic type, support closure, support hot update, more streamlined than LUA, but less efficient, no BUG found, the actual game running stable, no memory leaks
Github:https://github.com/easily/easyscript
Test code:
Func calc () {print (2 + 3) Print (2-3) Print (2 * 3) Print (2/3)}func Ctrl () {N= 1if(N > 0) {print ("" N > 0 "") } Else{print ("" N < 0 "")} arr= [A] for(i = 0, Arr.count) {print (Arr[i])} foreach (Iincharr) {print (i)}} Func closure () {n= 100F=func () {n= n + 1returnN} for(i = 0, 10{print (f ())}}func main () {print ("" Hello world! "") Calc () Ctrl () Closure ()}main ( )
Output:
Hello world!5-160.6666667> 0123123101102103104105106107108109110
The pure logic run efficiency is C # 1/50, the mathematical operation is 1/150,
So it's best to use it in areas where efficiency is not high and continue to optimize performance.
Currently used in the actual production environment, our game skill system are written in ES script, are written by the planning, grammar is relatively simple, can quickly learn
Compiling the principle of things not good, a lot of functions are hard to heap out, but the function is perfect, but also in the compilation of the principle of knowledge, hope that later can be more optimized
If a small partner want to use, hope to find the problem can contact me in time, thank you
(C # & Unity) scripting language ES