Ireheart: The reason I mentioned Angelscript is because it seemed to be quicker and closer to the metal when it came to ease of binding to C++ APIs. But on further research I found out that it doesn't natively bind to a C++ class so that you can inherit it from AngelScript code so it turns out it was less great. Squirrel on the other hand using the Sqrat library seemed ridicusously easy to bind to C++ APIs so that you could inherit from squirrel code. And it's faster than both AngelScript and Lua. Don't think I'll be spending any time on that though for a while but it sure would be interesting to bind the full C++ API to Squirrel.
anael: Well I guess the larger goal with having multiple scripts is that each script should more or less be independent from the other and as re-usable as possible. That way you could run them concurrently. And if you want even further nice stuff, implement message passing between the different threads/scripts. It would also be nice to be able to attach a script to an entity (which I guess would be a behaviour in maratis).
The reason that I feel that using dofile for this behaviour is bad is mostly for semantic reasons building this huge tree of scripts just feels a bit wrong and also clutters the lookup table (or whatever you'd call it). It also seems like if more files calls dofile on the same file they effectively copy all the code into them selves, I guess it's the difference between #include and import (modules vs headers). I'm not quite certain about how dofile works, if I make a lua module the way you would normally make a module in lua (module(..., package.seeall)) would it get imported/required properly? Unless I've possibly (and probably) misunderstood lua wouldn't it say that the script file is first this module from the dofile, then the other and then that one etc until you reach the final one and then the script would be the module of that file (as if I'm using the module function multiple times in a script). I might be wrong though.
Well yeah basically what I'm trying to communicate is that I'd basically like to have full access to the API you can use in C++ and pretty much the same power as far as fully accessing the core engine goes (not power as in I can reach the hardware and deploy malware via exploits etc etc), but from a scripting language. Because If I had access to it, I could easily write reusable behaviours like you would in C++. But with less pain and in less time.
For some further thoughts on AngelScript I had after doing some research today, have a look at what I said to Ireheart. Anyways, syntax has nothing at all to do with why I find AngelScript (or any other scripting language for that matter) more attractive than C++ for logic. It's more because I can rapidly make changes to a script and see the results immediately without recompiling or anything like that. Plus the fact that AngelScript has a C++ syntax does not lower it to the level of C++. Again though, further research showed that Squirrel is supperior when it comes to pretty much everything. Another benefit of using a scripting language for logic rather than C++ is because it opens the possibility for awesome one click export to multiple platforms. You could package maratis so that it has access to MaratisPlayer executables for all supported platforms and then when you click export to say Mac from linux it will grab the MaratisPlayer stuff for mac and you now, export all the things! And additionally when exporting you can add additional optimizations like precompiling scripts to bytecode (which will make people who are afraid of having their code visible happy, myself not included for the afraid part, I'd be happy about the saved processing time). I suppose the MaratisEditor also could go ahead and not cache scripts and maratisplayer cache scripts for gained performance. You know, things like that. I could pretty much just click export to Mac and trust that the game now runs on Mac (won't even need do add a bunch of ifdefs for different platforms) without having to boot OSX (or even owning a Mac!) and compile all my behaviours (and if I'm really paranoid, send it to a mac user and see how it runs) since it's already compiled to cross platform bytecode.
I don't know if I'm coming through here, but for me being able to access full Engine API from some awesome scripting language like Squirrel to write behaviours seems godlike in many ways.