This discussion is archived
3 Replies Latest reply: Nov 9, 2009 8:10 AM by 843853 RSS

simple statically typed scripting language for my game?

843853 Newbie
Currently Being Moderated
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.