Posts Tagged ‘v8’

Overdue update again

Thursday, August 6th, 2009

Well looks like I forgot to update the site in nearly a month. Oops. I have an excuse though, its because I’ve been busy working on my mod for Star Trek Armada 2 (and hopefully Fleet Ops 3), Megadroid’s Mission Mod, which adds Lua to allow people to make single player missions – something people haven’t been able to do since the tools to do so were never released. It’s required much poking around, and endless use of function pointers.

I was initially considering using Javascript, but V8 seemed far too complicated for what was needed, and I’ve embedded Lua before. Instead of storing any data Lua side, Lua objects just store an id which is used in calls through to C++ which then looks it up to provide any data / functions. Seems to work ok.

I’ve also decided to take a new approach to secret project, and will be attempting to make it all ‘C-ey’ as opposed to all ‘C++-ey’, which should be interesting.

GFR2 and v8

Wednesday, February 18th, 2009

This week I’ve been looking at integrating Javascript into GFR2 for the user interface and game logic, as part of my project to upgrade GFR2. I’m using Google’s v8 Javascript engine, since it is reportedly quite fast, which is good – don’t want the JS holding up the UI.

I chose Javascript over other languages as im fed up with abusing Lua and doing everything wrong with it, and the embedding for v8 was comparitively simple – after a short time I got every Javascript feature I needed working with the C++ in GFR2, compared to Lua where I never actually got it all working.

Embedding v8 itself was quite nice, although I had to use a custom tool to build it, which eventually created a 70MB .lib file. Anyway, the actual structure is organised and not completely full of hacks (hurray). Hopefully by the end of next week I will have got a lot of the GFR2 logic and ui reimplemented in JS, and can continue making the game better.

Also, the base of tomorrow is nearly secured.