A cross-platform modding language for GameMaker games.
A cross-platform scripting language and compiler back-end for GameMaker projects. Use Catspeak to implement, fast and sandboxed modding support by compiling and executing arbitrary user code from files or text prompt.
Developed and maintained by Katsaii.
Logo design by Mashmerlow.
The spiritual successor to the long dead execute_string
function...
// parse Catspeak code
var ir = Catspeak.parseString(@'
let catspeak = "Catspeak"
return "hello! from within " + catspeak
');
// compile Catspeak code into a callable GML function
var getMessage = Catspeak.compileGML(ir);
// call the Catspeak code just like you would any other GML function!
show_message(getMessage());
...without any of the vulnerabilities from unrestricted access to your game code:
var ir = Catspeak.parseString(@'
game_end(); -- heheheh, my mod will make your game close >:3
');
// calling `badMod` will throw an error instead of calling the `game_end` function
try {
var badMod = Catspeak.compileGML(ir);
badMod();
} catch (e) {
show_message("a mod did something bad!");
}
If you run into any issues using this project, please create a GitHub issue or get in contact on Discord through the GameMaker Kitchen server.
while true { }
doesn't freeze your game, whether intentionally or unintentionally.Thanks to JujuAdams for giving important feedback on aspects of the implementation, an important step towards making sure Catspeak is battle hardened.
Thanks to TabularElf for donating lots and lots of prototype code for new Catspeak features.
Thanks to anyone spreading the good name of Catspeak.