Saturday, May 02, 2009

Using V8 for scripting in my game

I'm going to try and find time this weekend to throw google's "V8" Javascript engine into my game.

Basically, its a javascript implementation intended for embedding within applications (and its used by google in a lot of thier apps).

I figure using jscript as a language has some advantages for end users who want to play with modding the game. Alongside the benefits of having google funding the development of the script engine. Thier implementation seems easy enough and allows for some of my requirements (allows me to create/load scripts on the fly etc).

Reading up on thier license has got me thinking as well. Theyre using a BSD style license which is one I much prefer. I've been using OGRE along with a few other open source libs and honestly the LGPL and anything GPL based really irks me. I simply dislike DLL's and being platform dependant they annoy me because I then have to figure out how to stay within a LGPL license (which allows commercial usage with dynamic linking) on other platforms. After visiting the LGPL license website where its trying to push you towards GPL usage instead, I *really* dislike this idea that all software must be free. It seems like thier version of freedom means nobody earns a living.

Anyway, its enough to make me think again about my decision to use Ogre. Not that Ogre is bad and I know that theyve relaxed the licensing on Ogre to allow static linking too. But every library thats associated with Ogre ends up getting infected with the LGPL usage which means a dozen more DLL's to track and update.

I also plan on using webkit to run my UI, after considering lots of options I think ultimately it will be the most flexible. Using a typical web-browser based frontend means that I can literally prototype the UI using regular browser style tools. I could even use flash and flex to do it at a push.

Anyway, enough worrying, time to code!