Scripting for JMonkeyPlatform


I have a question regarding scripting in jMonkeyPlatform, will we see something like this soon in the editor?

What I mean by this if I am a bit unclear, I wish to have a feature where one can attach a script(JavaScript/BeanShell/etc.) to a scene file.

The scripts will typically do things like AI, model behavior, etc. and will work the same as a Controller, well, it should be a controller at the end of the day.


Like this?

Awesome normen, that is exactly what I meant.

I just didn’t figure it will work in design time.

Brilliant and what is nice is that it is in Java, no funny scripting language.


You can even “inject” any scripting language through java scripting support this way if you like, we try and make the whole thing logical from base to top :wink:

1 Like

I’ve already made up with a little library to parse any scripting language using the JSR-223 specification. I’ve managed to put it working with Groovy, Phyton, Javascript and Lua, all 4 cross-platforms.

But you must decide what information will enter in the context you’ll set up for the script. I prefer to add specific things to the context of the script, instead of importing the whole thing to the script. But it really isn’t a hard thing to do using the JSR-223.