Is it accurate to say that your goal is to run the Boids script entirely in Max without having a crow connected at all? So essentially max is simulating running the crow script for you?
If that is the case (sounds like it is based off of your description), your approach will not work because the crow script relies on several lua libraries which live on crow and are very specific to crow. For instance, the metro library (see metro.lua in the GitHub repo), which defines on crow what a āmetroā is - this is not something that inherently exists within Lua.
Another crucial example would be ASLs, which do not inherently exist within Lua. In fact on crow, when an asl is generated, what actually happens is an entire separate section of the firmware takes the ASL command, converts it into a bunch of ābreak pointsā (think of the output from the max object [function] and how this gets passed to the [line] object in max), passes those break points and other ASL information to a whole separate part of the firmware written in C, and then runs a bunch of complicated C code to actually update the hardware outputs according to the original ASL which has now been translated into C commands.
So, what does this mean for your goalā¦
it means that you will need to strip away any part of the boids lua script which references things that are Crow specific and simulate those parts using max objects. I havenāt looked at the boids script in a while, but knowing @Galapagoose, Iām sure the boids logic is nicely isolated from the parts of the code that read and set the ins and outs on crow. You will want to simulate āreadingā the inputs in max and then pass that as data into the jit.gl.lua object. You will also need to read up a bit on how the jit.gl.lua object handles data sent to its inlets and generates data sent to its outlets.
You will need to take whatever data is generated by the boids logic and pass it out to Max and then simulate updating Crowās outputs using Max objects.
Hopefully this makes sense!
Happy to give pointers where necessary.