ive started to port lua over to Java and use it for my game as a scripting language. Its going, okish.
I was thinking that I could contribute it to jME once its finished? any ideas or thoughts on this matter would be greatly appreciated.
Btw, this is a HUGE project, and the C source for Lua is around 1Mb, so porting this over to jME would increase the size of the jar dramaticaly. So keep that in mind.
One of its uses would be scripted AI, just like in Call Of Duty. I think cryteck engine uses Lua to script its AI behaviours and the environment.
I have experience with MaxScript and I was thinking of porting that over, but lua seemed more supported and more professional.
Or do you prefer BeanShell?
While I appreciate the effort, I do have to ask why? There are many Java scripting languages out there already. BeanShell, Groovy, etc. Why not just use one of them? If it’s just for your own education and edification, then I completely understand (that’s how jME started. )
mainly it is for my education, the second is CryTek is such a cool engine (FarCry people), i thought of making jme compete with what the big boys are doing. I dont have a great deal of information regarding Paralax mapping or Normal mapping, so I cant go there, scripting seemed the next option that I could pull of with a huge injection of caffine and a miracle or two.
Well, by all means give it a shot, but we won’t be putting scripting systems into jME. There are already too many good Java scripting systems for us to use our own.
so you would prefer to use BeanShell which has an almost identical syntax to java rather than Lua? Ive just downloaded BeanShell, and it looks cool!
So would you prefer if I added an interface to beanshell for example?
BeanShellInterface bsh = BeanShell.load("jmetest/data/scripts/ai.java");
or something? or is that not how its done? i have indulged into beanshell yet.
Well, the way beanshell is, there is not any real need to integrate anything into jME. The user application will simply make use of the two together.
Fair enough. Just one more question, ive looked at both beanShell and groovy, and they both seem equally powerful. Which would you prefer tho?
I’m not a good source on that. I’ve only played with both very briefly.
I suggest you take a look at Gregory Pierce’s site. It has an overview and comparison of several Java-integrated scripting languages.
I’m using a scripting language for my game too!
Putting the interpreter into the engine is straitforward and then I can ‘compile’ as needed to speed things up.
All my non-technical types can use it, because it’s really a sub-set where I provide examples. They don’t have to worry about all the imports and stuff.
Also, experiments in the past have proven quite successfull integrating php into Java as a scripting language, non-web based applications too!