Script evaluation

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums

Wich is the best language?

Lua
15
38%
Python
6
15%
Ruby
1
3%
JavaScript
2
5%
GameMonkey
2
5%
Other (specify wich language)
10
25%
I have to write my own scripting language (lol)
4
10%
 
Total votes: 40

Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

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
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

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
Well you should read an article on their website about scripting with mono.
The website seams to be not working atm.
Working on game: Marrbles (Currently stopped).
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

serengeor wrote:
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
Well you should read an article on their website about scripting with mono.
The website seams to be not working atm.
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
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

Radikalizm 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 never used .NET languages, this might be the first time :)
Working on game: Marrbles (Currently stopped).
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

serengeor wrote:
Radikalizm 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 never used .NET languages, this might be the first time :)
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 wonder how it will work performance-wise when used for scripting, maybe I should build some different scenarios to compare various scripting languages
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

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 only got small ("Hello world" like) apps to run with java, I got frustrated by manual compiling and went back to c++ :D
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 think that it should be fast since it is used in Unity.
Working on game: Marrbles (Currently stopped).
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

serengeor wrote:I only got small ("Hello world" like) apps to run with java, I got frustrated by manual compiling and went back to c++ :D
For java development at my university we have to use Eclipse, which is a pretty cool IDE imo, no manual compiling for me 8)
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

Radikalizm wrote:
serengeor wrote:I only got small ("Hello world" like) apps to run with java, I got frustrated by manual compiling and went back to c++ :D
For java development at my university we have to use Eclipse, which is a pretty cool IDE imo, no manual compiling for me 8)
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 :)
Working on game: Marrbles (Currently stopped).
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

serengeor 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'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* Assembly

I should try to convert these people and recruit them to work on my engine...
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Post by hendu »

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.
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

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.
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 overkill

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 :wink:
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

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.
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.
Working on game: Marrbles (Currently stopped).
viejodani
Posts: 32
Joined: Tue Nov 10, 2009 3:09 pm

Post by viejodani »

Both Anglescript and Squirrel look pretty good tome and the small test I have done were promising.

I love python but I haven't done a good scripting integration with C++
-- Never lose your sense of wonder --
Nalin
Posts: 194
Joined: Thu Mar 30, 2006 12:34 am
Location: Lacey, WA, USA
Contact:

Post by Nalin »

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.
lefticus
Posts: 6
Joined: Mon Mar 21, 2011 8:20 pm
Contact:

ChaiScript

Post by lefticus »

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.
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.

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
Post Reply