GMS 2 Accessing/Modifying values of extensions with best performance

Mert

Member
Hi.

This was a post about efficiently sending data to extensions, and receive from them. Normally, we can send arguments(double and string) as parameters to functions. Sometimes, we need more than that, and send some blob of data. In the past it worked like this:
GML:
extensionFunctionX("Hello:!HowAreYou:!200:!Who");
And then in the extension(Java/Javascript/Cpp), we parsed this blob of data. Like:
JavaScript:
var str =
function extensionFunctionX(data) {
    var str = data; //"Hello:!HowAreYou:!200:!Who"
    var res = str.split(":!");
    
    //Use the data
    var first = res[0];
}
However, this looked ugly. Then I found out something, mainly from Yoyogames' extensions source code. I detailed this in the following video


 
Last edited:
Top