I am aware, but they are both for end users and myself (internal game stuff), and having the built-in game scripts managed by the content pipeline will be much more convenient, I imagine. (letting the Content manager load them for me, potential optimizations that MG team might implement, maybe some settings I can play with via the content manager, and having MG object wrapping them up and providing nice API). MG team did some pretty awesome job with the content management, and I want to take advantage of that wherever possible.
BTW you could say the same things about XML files (C# can easily load them from plain files in your game dir and on the paper there’s no justification of having them in the content pipeline) yet I found that using MG content for XMLs proved to be much more convenient and efficient in the long run.
Didn’t find any built-in support in C# scripting nor a ready third party lib that implement an importer for that. Did I miss something? That’s part of the reason I asked, maybe someone knows a neat way to integrate that I missed or implemented his own code and willing to share.
Perhaps you didn’t understand what I meant by safe. I don’t care about cheating the game, I care about a user script installing malware on innocent player’s computers. And that’s very language dependent. For example, if I somehow integrated with and used Python 2 it would have been very hard to prevent users from accessing filesystem and doing nasty stuff, since Python 2 sandbox is known to be broken (as stated by Python dev team).
At the bottom line clearly there are solutions for everything, but keep in mind I’m trying to implement simple scripting support for a game, I don’t want to start spawning processes and VMs with different privileges and do crazy platform-specific stuff just to make sure the user scripts can’t access filesystem or install evil stuff on the unsuspecting player’s machine…
But if I chose LUA, for example, I know all of this isn’t a problem because LUA is built in a way that you choose which APIs and objects scripts can access. Its part of the language.
PS I also know there’s a thing called AppDomain I can use in C# but I’m not sure about integration with different scripting languages and how much extra work it will take to wrap scripting in (if possible).
I disagree. For example, if I use C# scripting I might be able to pass a whole C# object into the script and let the user play with it as-is, without writing any serializers etc (I don’t know if I really could, that’s why I’m asking). But maybe if I use LUA there is this awesome lib I’m not aware of that do that awesome thing that will totally change my life. That’s why I’m asking about personal experience with integration, not guessing around.
Also some scripting languages integration can be as easy as setting up a callback, while others might require to write bloated classes with crazy API and add long and useless config files or whatever.
And why would I write a text parser?? Part of the idea of using an existing scripting language instead of developing my own is that I don’t need to go through the hell of writing a text parers for a scripting language… I’ve been there.
Not true… IronPython for example is not supported on IOS (as far as I know, maybe it changed recently). at the moment it doesn’t bother me too much, but its still a factor I’m taking into consideration.
I hope I didn’t sound rude or anything in my response. I do appreciate your comment I just strongly disagree with most of it