Well, it looks like Chet answered your question. Note that the demo you pointed at to doesn't use VolatileImages at all.
A couple of suggestions: you might want to refrain from using Image.getSubImage() method call as it disables potential use of hardware acceleration for the particular image. So instead of doing getSubImage() in your draw() method, use the Graphics.drawImage() call which takes coordinates of the area to be copied from the source image to the destination. Also, as Chet pointed out, you don't really need to use VolatileImages for your sprites, just use regular BufferedImages (which are managed since 5.0) - you have a better chance of having them hardware accelerated (that is, if you stop using getSubImage()), and they require much less maintenance than VolatileImages. Another thing, your sprites are 1-bit transparent (BITMASK), but they are stored in translucent png images. Consider storing them in 1-bit (bitmask) transparent images (you can use gif format then), since translucent images are not accelerated by the default pipelines. And if you do need to use translucent buffered images, it's better to use type INT_ARGB instead of 4BYTE_ABGR unless you really need it for some reason. Thanks, Dmitri On Mon, Aug 28, 2006 at 03:18:11PM -0700, [EMAIL PROTECTED] wrote: > Wow, I guess there's a lot of variables in this issue.. > > I'm currently using JDK5, though I was thinking of switching to JDK6 for the > potential speed improvements. My only reservation is that I use Eclipse, and > I know that it took a while for Eclipse to support JDK5, but I'm not sure if > that will be an issue this time. > > Yes, this is on Windows. > > I'm using windowed mode because 1) Fullscreen exclusive doesn't seem to be > supported on my machine (I have a check setup in my program.) and 2) My > program is more than twice as fast in windowed mode. > > I am using a BufferStrategy. > > Basically, I was using BufferedImages, but I switched to VolatileImage for > performance. With the BufferedImage, I didn't have the transparency issues. > > A little demo of my program can be found at > http://www.eng.uwaterloo.ca/~rcfox/dist.zip > > Thanks for the quick reply! > [Message sent by forum member 'dialup' (dialup)] > > http://forums.java.net/jive/thread.jspa?messageID=147841 > > =========================================================================== > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > of the message "signoff JAVA2D-INTEREST". For general help, send email to > [EMAIL PROTECTED] and include in the body of the message "help". =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".