Scripting Library compitable with C
Hey all, I'm wondering if you are aware of any scripting libraries that are compatible with C?
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.
Quote:Original post by rip-off
there are probably bindings from some javascript implementations to C.<!--QUOTE--></td></tr></table></BLOCKQUOTE><!--/QUOTE--><!--ENDQUOTE-->SquirrelFish (formerly WebScriptCore), the javascript engine used in Safari, has a C API.
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.
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.
Seriously, why? I don't know JS well enough to evaluate the relative merits.
Quote:Original post by PromitNo 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.<br><br>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.
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.
javascript the <em>language</em> 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...
Quote:Original post by CodekaFor 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.
I don't know how easy something like SpiderMonkey would be to integrate into a game, though, because Lua is dead simple...
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...
One of the other reasons I prefer javascript is <a href="http://doc.trolltech.com/4.5/qscriptenginedebugger.html">QScriptEngineDebugger</a>. In few lines of code you get a <a href="http://doc.trolltech.com/4.5/qtscriptdebugger-manual.html">visual debugger</a> (as part of your application) where you can set breakpoints, debug line by line and watch variables.<br>I have not come cross anything similar for Lua.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement