Sign in to follow this  
PAndersson

Scripting Library compitable with C

Recommended Posts

I suspect most would be, given that C is the most common choice for inter language communication and library interfaces. I know Lua, Ruby and Python are compatible, there are probably bindings from some javascript implementations to C.

Share this post


Link to post
Share on other sites
SpiderMonkey (javascript engine used in Firefox) is also written C and provides a nice C interface for embedding. javascript engines are a good choice currently because they are well tested, heavily optimized and in active development.

Share this post


Link to post
Share on other sites
So is Lua, and it's been used by many big-name games over the years. Why would you pick JS instead?

Seriously, why? I don't know JS well enough to evaluate the relative merits.

Share this post


Link to post
Share on other sites
Quote:
Original post by Promit
So is Lua, and it's been used by many big-name games over the years. Why would you pick JS instead? Seriously, why? I don't know JS well enough to evaluate the relative merits.
No good reason, unless you have some investment in javascript. However, the improvements in javascript interpreter performance over the last couple of years make it a very viable choice, and if you intend to expose your scripting language to the artists and designers, a lot of people have existing javascript/actionscript experience.

As I understand it, the cutting edge builds of V8/Trace Monkey/SquirrelFish Extreme all beat plain Lua on speed (in some cases by considerable margins), but LuaJIT is far and away the best performing scripting language I have seen benchmarks for.

Share this post


Link to post
Share on other sites
javascript the language is actually pretty neat (most of the time, when people say "javascript sucks" they're actually talking about the DOM and interaction with the browsers). I don't know how easy something like SpiderMonkey would be to integrate into a game, though, because Lua is dead simple...

Share this post


Link to post
Share on other sites
Quote:
Original post by Codeka
I don't know how easy something like SpiderMonkey would be to integrate into a game, though, because Lua is dead simple...
For SpiderMonkey there is Flusspferd, which despite the crazy name, is ridiculously simple to use - arguably easier than luabind, et al. Several similar tools exist for V8 as well, though sadly nothing yet for SquirrelFish.

However, and this may be the bigget factor to some developers, all of the javascript interpreters weigh in a lot heavier than Lua (megabytes more, in some cases). That plus the performance advantages of LuaJIT, still keeps javascript a second class citizen in my view...

Share this post


Link to post
Share on other sites
Quote:
Original post by diablos_blade
Decoda.
I only just discovered it myself in the last few days and haven't had the chance to try it out. But it seems to do everything I'd expect of a debugger.

Nice, I did not know that. But it is not free and it does not support Linux and Mac. This is not so important for most of the game developers (but for me). Decoda also does not seem to be in active development, last release was April 22, 2009 and the image on the homepage does not load for me.

I'm currently very happy with Qt and don't see any reason to use another library for something Qt includes. I did drop all small libraries for scripting, image loading, gui, networking,... in favor of Qt. As we are discussing about scripting, Qt also generates bindings automatically. Having one big library is working very well for me.
I remember Luabind was for a long time not compatible with the latest version of Lua, something like this does not happens with Qt. Maybe another reason to relay on one giant instead of bunch of libraries developed by individuals.

Tough Qt is not a C library, if for some reason one has to stick with C this benefits are irrelevant.

[Edited by - Kambiz on March 7, 2010 9:55:14 AM]

Share this post


Link to post
Share on other sites
Thanks for the suggestions people. I have implemented Python and it works very well, would be perfect if I just could find a way to be able to delay the scripts themselves halfway through without pausing the game loop.

Share this post


Link to post
Share on other sites
Quote:
Original post by Kambiz
Quote:
Original post by diablos_blade
Decoda.
I only just discovered it myself in the last few days and haven't had the chance to try it out. But it seems to do everything I'd expect of a debugger.

Nice, I did not know that. But it is not free and it does not support Linux and Mac. This is not so important for most of the game developers (but for me). Decoda also does not seem to be in active development, last release was April 22, 2009 and the image on the homepage does not load for me.

I'm currently very happy with Qt and don't see any reason to use another library for something Qt includes. I did drop all small libraries for scripting, image loading, gui, networking,... in favor of Qt. As we are discussing about scripting, Qt also generates bindings automatically. Having one big library is working very well for me.
I remember Luabind was for a long time not compatible with the latest version of Lua, something like this does not happens with Qt. Maybe another reason to relay on one giant instead of bunch of libraries developed by individuals.

Tough Qt is not a C library, if for some reason one has to stick with C this benefits are irrelevant.


I am a happy user of decoda, and it is actively developed by a game studio whos developers are currently working an natural selection 2. They use their own editor so i think they would work on it.

Anyways, seems like you already have what you need figured out.



Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this