

Having written numerous custom code transpilers and generators, I was able to make the program perform sufficient compile-time analysis and generate equivalent and fairly clean JS code for input GML. Having written numerous syntax parsers in past, I was able to mimic how GameMaker itself works very accurately - down to little-known quirks and seemingly-illegal constructs. As a bonus, the official implementation is a big black box, meaning that any assumptions about inner workings would have to be either based on examining output code or be pure guesswork as such. With 1-minute setup time and unparalleled functionality, the extension is generally regarded as something that should have been part of GameMaker itself.Īfter working with GameMaker, parsers, compilers, and web-based tools for years, I have grown increasingly curious as to just how hard it is to compile GML to JavaScript.Īs it turned out, pretty hard - while GML does look akin to JS, it spots substantial differences both in what is considered valid syntax and in actual workings.
#How to add mods to nuclear throne together update
Of course, as it usually turns out, it was still a crazy amount of work,īut the result was truly impressive - you import an extension,Īdd a single line of code to your code of interest, start up a helper app together with the game,Īnd that's it - you can now edit the code and see it update in-game the instant you hit "save". I could have the game load up and execute code as it's changed,Īnd that would be so much faster for prototyping new code in large projects. If I could make a complete GML compiler+interpreter work inside of GM, I've had an even wilder idea - as I already handle almost entirety of GML syntax, why stop there? Slightly less than a year after the release of original web-based version of GMLiveĪnd work on modding system for Nuclear Throne Together, Commonly used in JavaScript to make it easierįor optimizers to analyse code, this is also handy in GML to eliminate lookup overhead. "sf" stands for "super-flat" - an approach where field paths are completely flattened,Ĭom. -> com_pkg_Class_func.To far more ambitious projects such as GMLive. To netcode tools (at this time, in most projects) Over time the compiler was expanded to support a large quantity of Haxe and GML specific features,Īnd is widely used in my other works - from my Lines of netcode in plain GML, but lack of compile-time checks would cost you some sanity. To write complex code for GameMaker games - for example, you could write thousands of (utilising classes, interfaces, or many other features of the programming language)Īnd have it compiled to equivalent GML code.įrom the start of it's development in 2015, the primary goal of the compiler was to make it feasible That is, you can write high-level code in Haxe Compiler module that lets you write code for GameMaker projects in Haxe.
