Hi!
Im quite new to JavaGaming, but I made a demo to test the performance om my p4, 3GHz, radeon card machine.
I get around 60 FPS in 800x600 fullscreen and window modes.
With 1000 blits from the same BufferImage. (32x32 pixels Bitmask).
With 750 blits, I get 80 FPS.
My question is this the best I can expect from Java2D or is there something else I forgot?
I use BufferStrategy, 2 buffers for window and 3 for the fullscreen mode.
And a second question, what is the best way to implement a simple particle engine for
game explosions and smoke. Small sprites or colored pixels? And can I use transparency with
colored pixels and still retain the hardware acceleration?
Thanks in advance.
I use this code to load images:
URL url = getClass().getResource("../../"+fileName);
BufferedImage tempImage = ImageIO.read(url);
BufferedImage image = GameFrame.gc.createCompatibleImage(tempImage.getHeight(),tempImage.getWidth(),BufferedImage.BITMASK);
Graphics g = image.getGraphics();
g.drawImage(tempImage,0,0,null);
g.dispose();
This is the output of “-Dsun.java2d.trace=count”