Script evaluation
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
Well you should read an article on their website about scripting with mono.Radikalizm wrote:Isn't Mono just a open-source alternative to the .NET framework and the CLR virtual machine?
Never thought of it as a way to implement scripting
The website seams to be not working atm.
Working on game: Marrbles (Currently stopped).
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
Yeah, would be nice to use C# for scripting, my design documents only consider Python and LUA right now, but my skills in C# are way better than both of thoseserengeor wrote:Well you should read an article on their website about scripting with mono.Radikalizm wrote:Isn't Mono just a open-source alternative to the .NET framework and the CLR virtual machine?
Never thought of it as a way to implement scripting
The website seams to be not working atm.
I never used .NET languages, this might be the first timeRadikalizm wrote: Yeah, would be nice to use C# for scripting, my design documents only consider Python and LUA right now, but my skills in C# are way better than both of those
Working on game: Marrbles (Currently stopped).
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
The .NET framework is really great for building tools and add-on applications, C# is very much like Java, so if you're familiar with Java you shouldn't have any problems adapting to C#serengeor wrote:I never used .NET languages, this might be the first timeRadikalizm wrote: Yeah, would be nice to use C# for scripting, my design documents only consider Python and LUA right now, but my skills in C# are way better than both of those
I wonder how it will work performance-wise when used for scripting, maybe I should build some different scenarios to compare various scripting languages
I only got small ("Hello world" like) apps to run with java, I got frustrated by manual compiling and went back to c++The .NET framework is really great for building tools and add-on applications, C# is very much like Java, so if you're familiar with Java you shouldn't have any problems adapting to C#
I think that it should be fast since it is used in Unity.I wonder how it will work performance-wise when used for scripting, maybe I should build some different scenarios to compare various scripting languages.
Working on game: Marrbles (Currently stopped).
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
When I got to know about eclipse I didn't really want to go back and try java, I wouldn't really know what to do with it now anywaysRadikalizm wrote:For java development at my university we have to use Eclipse, which is a pretty cool IDE imo, no manual compiling for meserengeor wrote:I only got small ("Hello world" like) apps to run with java, I got frustrated by manual compiling and went back to c++
Working on game: Marrbles (Currently stopped).
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
I'm not using Java for anything non-university related either, but I know a couple of people who swear by Java programming and managed code, and who would never even go near anything like C++, C or even more low-level like *gasp* Assemblyserengeor wrote:When I got to know about eclipse I didn't really want to go back and try java, I wouldn't really know what to do with it now anyways
I should try to convert these people and recruit them to work on my engine...
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
It seems mono is used in a lot of commercial applications and games as a scripting solution now I read the article serengeor mentioned, and since games are mostly very script-intensive and since mono supports a great variety of languages it seems to be a great option, so I wouldn't classify this as overkillhendu wrote:IMHO using Mono for scripting would be a bit overkill. IIRC it's fairly huge with all the base classes, a few ten MB maybe.
Also, there will probably be a lot of parts of the library which aren't needed if you're just going to use it to run scripts (I'll just need the bytecode interpreter, which is scripting language-independent), and with optimizations you'll probably get a nicer overall size
I'm pretty sure that if you'd static link it it would be much smaller, and I think that its fair enough to trade size for functionality if you need it.hendu wrote:IMHO using Mono for scripting would be a bit overkill. IIRC it's fairly huge with all the base classes, a few ten MB maybe.
Working on game: Marrbles (Currently stopped).
ChaiScript
Yeah, that's why I wrote ChaiScript (I saw that it was mentioned previously in this discussion). It requires about 1/2 the code to bind compared to AngelScript, and new types (mostly) just work automatically.Nalin wrote:I personally chose AngelScript because it is so stupidly simple to bind to your program and I didn't want to spend all my time writing code to bind a language like Lua. I guess what I am saying is that I am lazy.
My day job involves a lot of work with SWIG. Really, for any of these scripting solutions, using one that has a tool to help you (SWIG, luabind, boost::python) will save you a lot of time in the long run.
ChaiScript is approximately equivalent to using luabind or boost::python, but since the language was designed with C++ in mind, it works totally naturally with your C++ and doesn't impose any requirements on the types you expose. For instance, copy construction and assignment can be disallowed by your class and that's OK. Thread contexts are automatically tracked and you can throw an exception in ChaiScript and catch it in C++, or throw it in C++ and catch it in ChaiScript.
-Jason