views:

46

answers:

1

i want to program a simple java game, what should i consider to make it maximal portable? i'm pretty new to java, which grafik and rendering libraries should i use to make it easyly portable to mobile java (for mobile phones)? i can't develop it directly for mobile java, because i also need a pc version. or should i jast develop strait forward for pc and do a completele new mobile version later?

+2  A: 

I'd say do the PC version first (portable across Mac, Linux, Windows if that is a priority for you), and develop a (or even several) completely new version for mobile handsets.

There may be some code (and art work) that you can re-use, but not too much, as a (good) game will have to be very different for a mobile phone than for a PC, not just screen sizes and input methods, but the major changes in game play that those differences probably result in to make it still fun to play.

The code that you can reuse will likely need to be adapted for J2ME or Android, but better to worry about that later than trying to be overly cross-platform from the beginning (which would place limitations on functionality on the PC version, and eat up a lot of time, without being sure if it ever pays off).

Again, if anything, worry about portability within the several desktop environments, and within several handsets, but not too much about portability between the two.

Of course, if your game has a server-side component, it would be ideal to have only one version of the server code that can talk to clients on all platforms.

Thilo