I have just bought the new Sony Ericsson K700 and is quite impressed with it. The JavaVM is really fast and stable so the following is probably quite feasible but the question is whether it is a good idea.
I wrote an XML parser (see http://vredungmand.dk/programming/sjg_xml/
) a while back that I use to parse configuration files in my applet games. The configuration files are more or less the backbone of my framework (see http://vredungmand.dk/programming/sjg/
) and I get a really nice and flexible architecture from it.
The question is: Should I port the XML parser and use a similar scheme on J2ME? I can see the following alternatives:
1. Port the XML parser and let it work similar to the applet framework.
2. Write a step in the build process that convert the XML files into something that can be read faster (a binary data file).
3. Do configuration in the Java code. (I.e. mazes.add("maze1", "...........x...............x........xxxx..................."); ) possible generated by a build step.
I would like to program games for slightly less capable phones as well.
Any advice? Do you guys always sacrifice good architecture/design for speed when it comes to J2ME?