Original Post
I have been working on a pure Java game for some time now. However, I have some advanced questions about AWT graphics processing that I was going to throw out to everyone here.
1) I have read about MemoryImageSource, but when I have implemented basic trials of it, I see a halving of my frame rate. I use the setAnimated function to have it redisplay itself whenever a call to newPixels is made. Does anyone have any suggestions or comments on the performance of MemoryImageSource in their games.
2)I recently reread the Javadocs on graphics.. It says that drawImage returns immediately. If this is the case, how does one accurately get a frame rate? The method that I''ve been using is to get the time via system calls and subtract the time before the call from after the call to drawImage.
3) Other than using JNI to augment AWT, does anyone know of any ways of increasing performance in a Java game application? I know this is a broad question, but I''m not terribly sure of what tricks people have come up with.