A lua to jass compiler.
Simply provide a common.j and your lua script to the exe and receive a war3map.j
Now add some
(Bonus bonus points to me as i run this through jhcr, that is compiling lua to jass, interpreting that jass in jass itself, and then running that jass in lua via wc3 jass2lua. ez).
Some things don't work at the moment (and maybe never). You can see which one over at github.
Contrary to the slim real-world usecase of this whole endevaour this probably currently doesnt run on older patches. But i don't think there is any fundamental problem with it. Except maybe the way lower opcount code in earlier patches.
Speaking of slow stuff: the garbage collector is a very simple stop-the-world mark-and-sweep. So better don't produce too much garbage.
Also this is probably still very buggy. Anyone who has ever written a GC knows the pain. Feel free to report any bugs but don't expect too much attention. I spent way too much time on this allready.
Simply provide a common.j and your lua script to the exe and receive a war3map.j
Code:
$ lua2jass common.j war3map.lua war3map.j
Now add some
config
and main
functions (in jass ofc) to your script, execute the lua main (call ExecuteFunc("lua_Main_init")
) and have your lua script run god knows how much slower in your good ol' jass vm. Bonus points if you start your map with jass2lua translation.(Bonus bonus points to me as i run this through jhcr, that is compiling lua to jass, interpreting that jass in jass itself, and then running that jass in lua via wc3 jass2lua. ez).
Some things don't work at the moment (and maybe never). You can see which one over at github.
Contrary to the slim real-world usecase of this whole endevaour this probably currently doesnt run on older patches. But i don't think there is any fundamental problem with it. Except maybe the way lower opcount code in earlier patches.
Speaking of slow stuff: the garbage collector is a very simple stop-the-world mark-and-sweep. So better don't produce too much garbage.
Also this is probably still very buggy. Anyone who has ever written a GC knows the pain. Feel free to report any bugs but don't expect too much attention. I spent way too much time on this allready.
Attachments
Last edited: