views:

193

answers:

5

I'm trying to write a rogue-like game for my blackberry and hopefully any other phone that supports some sort of JVM.

Because I use Java in my job I'm looking to write the game in another language but I cannot find a language that will work on multiple phones.

Am I stuck with Java?

+1  A: 

You could try to use another language for the Java platform. Unfortunately you'll be rather limited there as well, because J2ME is based on a rather ancient version of Java SE and most modern languages for the Java VM need either Java 5 or at least Java 1.4.

Joachim Sauer
But Android is not J2ME, it's more than that.
Jesper
@Jesper: granted, but the BlackBerry API is based on J2ME and since he's talking about Java+Android+BlackBerry I was assuming he's interested in a common ground.
Joachim Sauer
maybe scheme for java is an option: http://norvig.com/jscheme.html
NomeN
I do like scheme but I would prefer clojure.
Adam Gent
+1  A: 

If you're programming for Android, you could for example use Scala, see Scala on Android. Scala compiles to Java bytecode. There are also other languages which can be compiled to Java bytecode; I don't know how well-suited they are for Android programming.

Jesper
Do I than convert the byte code to dex or what ever the dalvik format is?
Adam Gent
This might be the best option because I really like Scala. I'll probably just have to wait for Blackberry to suck less.
Adam Gent
Yes, interestingly the dalvik compiler operates on the .class files, not on the raw code. All you have to do is run the dx tool (in the android sdk) on the class files generated by the Scala compiler. The bigger limitation is going to be Blackberry. AFAIK Java is the only language you can write Blackberry apps in...
Chris Thompson
I'm an idiot...disregard the last part of that comment.
Chris Thompson
@Chris - you can always edit your comments. Or copy-delete-paste-add them.
Stephen C
A: 

Lua runs very well on small devices (I use it on my handheld), but it is designed to be coupled into a C API. You may well have to write glue code yourself, which is easy, but if the official APIs are Java APIs and there is no C API, you'll be out of luck.

Norman Ramsey
I just don't like Lua that much. But I appreciate the answer
Adam Gent
A: 

Actually C++ is pretty universally supported at this point. However you are completely stuck with Java for Blackberry.

Chris Thompson
A: 

Technically, I think the second (JavaME being first) most widely deployed runtime worldwide is Flash Lite.

Whether it would be a good idea to use it for your game development is another matter entirely of course.

Number three is Symbian OS C++ but that won't work on your Blackberry.

QuickRecipesOnSymbianOS