• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Asset - Extension LuaRousr - Use Lua with your GMS2 games!

babyjeans

Member


LuaRousr
Price: 9.99
Demo
(lovingly provided by @net8floz)
Currently Windows Only

LuaRousr is a GMS2 Extension that enables you to run (and even reload and run again) Lua scripts with your GMS2 games. It features the ability to bind instances as Lua objects, (only instance variables are automatically bound currently) and you can bind your own functions to call from your Lua scripts as well.

This allows you to easily make moddable games but could also help larger games with iterative design. Since the scripts are 'hot reloadable' it's much easier to tweak a script and reload than having to rebuild / rerun your entire game.

Marketplace
More info at Rousr
 
Last edited:
R

rui.rosario

Guest
Just a curiosity: Is script binding actually calling GM scripts from Lua code or just switching context between Lua and GM to issue the call back? I'm asking this in order to assess the performance penalty of binding multiple scripts
 

babyjeans

Member
Internally, there's a buffer that is passed between Lua and GML. Once per step, GML ticks Lua, and then processes this buffer to make any calls that are necessary. So to oversimplify, a buffer says "call this script with these arguments" and GML does that.

EDIT: When you do a straight up call, or executeFile/String, the buffer is processed right then, and not at the 'step' part, to make the immediate execution of the script / function possible.

The 'step' part is if you're using lua coroutines.
 
R

rui.rosario

Guest
Interesting. Might check this extension out in a few days, not personally familiar with Lua but it might be interesting nonetheless
 
J

Joshua Allen

Guest
This is one of those things that YYG should add themselves so thank you for spending the time to add this yourself.
We will definitely be using this in the future.

Keep up the great work.
 

babyjeans

Member
Just been updated to v1.0.0!!!
Due to a bug with DLLs on Linux and OSX, those aren't published yet - but if you're interested in using them I can help get you set up. You currently are limited to using one or the other until the file naming bug for libraries is fixed (currently, they'll only work if I don't give the lib a file extension, since you can't have 2 files of the exact same name)
 

babyjeans

Member
Dropping to $5.99 for the Holidays. You know what it goes good with? ImGuiGML! (I bet you thought I was going to say eggnog)
 

babyjeans

Member
For the new year, we've upgraded to v1.1.1 which mainly does a bunch of cleanup and small optimizations!
 
Top