iDevGames Forums
Java: Sprite Performance - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Programming Languages & Scripting (/forum-8.html)
+--- Thread: Java: Sprite Performance (/thread-6946.html)



Java: Sprite Performance - davecom - Jul 5, 2003 10:53 PM

I've finished the first level of my UDevGame entry, and it's a little choppy on my G4 500 SP. Is this just to be expected, working in Java? I fear what levels with more moving sprites will look like. Perhaps things will significantly improve when I start compiling with optimizations after I finish the game? (AKA I'm done debugging.)

Also how can I pinpoint what is causing the most performance problems? I'm currently working at 20 FPS.


Java: Sprite Performance - IBethune - Jul 6, 2003 01:58 AM

Unfortunately, yes you can expect this kind of performance in Java. Also, due to most of the slowness being in the Swing graphics library (I assume this is what you used for your GUI) there's not that much you can do about it. Adding optimizations to the code will help a bit though.

If you want to see where it is that your program is using most time, use the Sampler tool which is in your Developer>Applications folder (where PB is). You can tell which functions are being called most often, so you know where to optimise your code.

- Iain