Subj : Re: Private data on function objects To : netscape.public.mozilla.jseng From : James Turner Date : Mon Jan 13 2003 10:46 am In <3E1DF1EC.5090903@meer.net> Brendan Eich wrote: > > What language or system are you bridging JS to and from, anyhoo? Hoo-boy. I'm attempting to use JavaScript as the implementation language for most of the rule logic in a game server for WorldForge (http://www. worldforge.org/). WorldForge is a project to build and run open-source massively multiplayer online game systems (UltimaOnline, etc). This is all highly experimental, don't look for references on the website or anything. The first thing i have to do (and part of the reason I decided to use JS, even though one of the other 'rival' servers uses Python) is that the set of types defined by our network protocol and data encoding layers matches the JS primitives very closely. So we have a layer which is sort of like XDR (though it can be encoded using any system you like, we use XML at the moment and have binary encodings too), and on top of that is a type / object system which defines the game objects ('entities') and the things you can do to them ( 'operations'). This entire system is common to all of the clients, servers and tools in development, and is implemented (so far) in C++, Java and Python, with Perl interfaces. The problem is, Atlas was designed by someone who'd used Python too much, and as a result it's C++ API is a bit of a dog, and excessively verbose to get anything done in. So my aim is to map the Atlas classes to JS classes, the Atlas entities to JS Objects, and so on, so that people writing game logic don't have to deal with Atlas at all, they just use JS objects / variables and everything works. So far, this appears to be working, but it's extremely early days. Anyway, once I have a webpage and something more interesting, I'll post it here. H&H James .