Possibilities and limitations (?) of the LUA interface
Posted: Wed Sep 01, 2004 9:42 am
Last night I finally got around to download the latest beta, and start playing around with the scripting possibilities. I've read quite a bit of the LUA reference and some of the book, as well as tried to modify some of the supplied lua scripts. Anyway, I'll just try to imtemize some of my thoughts:
- 1. First off a small bugreport. When I started modyfing one of the scripts I made a copy to a new folder in the scripts/menu/ folder to make it easy to find and distinguish from the "factory defaults". My new folder didn't make it to the menu in Moho though. I assume the "submenus" are hardcoded into Moho, but I think it would be great if the folders could be scanned and added to the menu at runtime, just like the scripts are. Alternatively, maybe there could be a separate top-level menu item for user defined scripts?
2. I read about interfacing to C functions in the Lua manual, and immediately thought: "Is it possible to write Lua wrappers for C libraries, and make calls to these from Moho Lua scripts?" So, is it?That would make the possibilities nearly endless, even though such scripts would have to be supplied with a .dll. My first thought was to wrap parts of the Open Dynamics Engine in Lua, and then create a plugin to allow for bone animation governed by real physics. How cool would that be? Such an undertaking would require both the possibility of making calls to other C libraries, and that the Moho Lua API is fine grained enough.
3. Has anyone thought of setting up a "Moho script repository"? I initially thought of setting up a Sourceforge project, but SF has had it's share of problems lately, and it would require every contributor to become part of the project, gain CVS write access and so forth. A bit too cumbersome in other words. Are there any plans at Lost Marble to set up a user repository? Or maybe one of the users have the possibility of hosting such a site?
4. Finally, how long will it be till we can get our dirty hands on a Moho Lua API reference?