I’m working on a patch in which I can create some Jitter Gridshapes and let them float in the space. I managed to do that in Lua, but I want to add some extra’s and that will mean the program will become much heavier. My question is; which language is the best for this situation?
I will need to calculate position and rotation of each object at around 25x per second. Should I stay in Lua, or write something in Java or C and pass the data to a Lua script controlling the objects?
Lua is an interpreted language, isn’t it? That would put it in the JScript ballpark.
I’m sure Lua’s developers will argue that it’s much faster than JScript, maybe it is. They’d need to pull a couple of rabbits out of a hat to get an interpreted language as fast as Java (though not entirely inconceivable to get close). An external in C is pretty much unbeatable, although you do have to factor in how much work you need to get a C-based external up and running.
I don’t now if it is.. So if I write an external in C to calculate the positions etc, and then pass it to a Lua script, it will be faster and more lightweight using Lua only? (It’s a good reason to start writing in C… ;) )
(C-based externals are an exception in that the only "overhead" is the basic Max message-passing stuff.)
C74 RSS Feed | © Copyright Cycling '74