Nice example! It ran a little slow on my G1 but that was fine.
Is there any way to animate the explosions?
You can improve the speed of your code by removing unnecessary method
calls.
For example,
out.println("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
out.println("<dimension version=\"1.0\">");
out.println(" <name>Asteroids</name>");
out.println(" <relativeAltitude>false</relativeAltitude>");
|
All those out.println() take time. I removed all but one of the
out.println() and the code runs faster.
|
out.println("<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
"\n <dimension version=\"1.0\">" +
"\n <name>Asteroids</name>" +
"\n <relativeAltitude>false</
relativeAltitude>");
Thanks,
Brooks