Right now I'm trying to fill the image array in the constructor, and this is called at initialisation. This doesn't help though. The first explosion is always flickering. Would using a mediatracker help, or does anybody know of some better way?
WHEN are you creating that object? If it happens the first time an explosion is to take place it may be too late, if so consider creating it during program initialisation.
You may also consider preloading the actual image data to a shadow area of video memory. That's how it's done in DirectX native programs, I don't know how you'd accomplish it in Java so you'll need to do some research into that.
posted 16 years ago
The Bat object is created at Game Init, ie before the game starts. So, as far as I get it, the images should have well enough time to be loaded before the explosion takes place. Somehow, though, this does not happen...
I will look into your proposal about the DirectX way. My eyes recently fell on the BufferedImage class. Maybe I could use that somehow to buffer the images... Well... We'll see!