Hi, I'm looking for a scripting language for my little game. I want make game runnable on both mobile and desktop. I would like to compile scripts to native java for j2me, so they don't suffer from interpreter overhead (possiblity of running an interpreter on j2me is a plus, I can imagine it on high-end devices). On j2se, I would like to have all code to be interpreted (or dynamically compiled, whatever) so user can, for example, download new game content from the internet. Also I would like the language to be simple and cute and it does not have to provide advanced features (like closures or generators). Even classes are optional.
To sum up the requirements:
- statically typed (ideally with smart type inference). This is must in order to allow compilation.
- as simple as possibly (all I want is to define some functions and call them from the game).
- can be compiled to clean Java (byte)code. I mean, it should not wrap every int to Integer for example. Compiled code runs on J2ME.
- can be interpreted (or compiled on demand). Possibility to do this on J2ME is not required but welcome.
- direct importing of native java classes is not required (actually I don't like it, I would like to draw a clean line between scripts and the engine)
- free license (gpl is ok too)
- python-like syntax is a plus :)
Anyone ever heard about such thing? I'm prepared to implement some missing features. Actually I'm prepared to write it all if I don't find suitable starting point.
I fail to see how this is a Java Game Development Issue, or even a Java issue: what you are asking for is a scripting language that you can consequently get the freedom to run on multiple environments through compiling to Java. IMO: not a Java issue at all.