The software I'm working most on,
CopperCube, is a quite complicated beast. It is targeted at people who want to create 3D apps and games, but do not want or are unable to program. To make this possible, you can easily click your apps together in CopperCube by using a fixed set of 26
Actions and 18
Behaviors. Together, they offer (an estimated) amount of 300 parameters, so you can do quite much with this already. But still, for more complicated apps - and a computer game is probably the most complicated piece of software there is - this is not enough.
So instead of adding more and more actions and behaviors, implementing them for each of the 5 supported targets separately (Windows and Mac OS X in C++, WebGL in JavaScript, Android in Java and Flash in Actionscript), I decided to create an extension mechanism. So that everyone can create their own actions and behaviors, share them with other users, and of course: So that also I can use this myself, and do not have to implement new functionality for all targets separately.
I did some prototyping and testing during the last days, and managed to create a nicely working extension system already. The prototype already works partially on Windows .exe, Mac OS X .app and on the Flash .swf target, so I can continue working from there:
The above creates a 2D Jump'n'Run behavior, which is actually functional already in my test build. The system works like this: For using/creating/downloading a new Action or Behavior, you only need one single file, which is a standard JavaScript text file, which you only need to copy into a specific extension directory. You can edit and save it with your favourite editor, Notepad++ in my case. CopperCube automatically re-reads this file when creating your app everytime. This makes it very easy to use. The JavaScript file has a small embedded XML section in its top, so the editor knows how and what the user can select and change in the property window of the behavior or the action. You can define types and default values for each property (like 'string', 'int', 'texture', 'color', 'scene node' and similar), and so editing such a behavior is exactly like editing a native one:
New actions or behaviors are written once, and work on all targets. The language used for this is JavaScript. I chose it because it is very simple to learn, most people already know it, and (ab)useing its dynamic features is quite useful for quickly scripting new features like this. It doesn't have the best reputation regarding performance, but I've tested it, and for the needs in CopperCube, it's pretty ok. Just don't try to write a raytracing 3d engine with it :)
This new functionality also makes it possible to script all the target using one, single language, with one single API. Meaning CopperCube will probably be also become a lot more interesting for programmers. So I'm looking forward for it to be finished soon. It will take still a bit of time to be implemented fully, but the next update of CopperCube will already include a usable beta of it.