2
\$\begingroup\$

I have seen two different rendering methods. One of them is rendering multiple bufferedImages like g.drawImage(image1 to imagexxx, x, y). Like in my game I have to render, on each tick, 880 buffered images. This is very bad. I have a good computer but my max fps is 140. There should be another way to get better performance.

The second way is drawing one single bufferedImage and setting its pixels to RGB from the other bufferedImages.

What is the best way? Is there another way to get better performance?

\$\endgroup\$
  • 2
    \$\begingroup\$ What's wrong with 140 fps? \$\endgroup\$ – skypjack Dec 27 '15 at 8:13
1
\$\begingroup\$

I personally would prefer the second method, because it allows you to manipulate the one buffered image, that you're using, so you can, for example apply filters and do some post processing with it. Also you can set a fixed resolution for your game and do some scaling.

I hope that helped at least a bit

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.