Rotating large images

Hi

I’m thinking about a top down 2d game in the style of Nox (if I remember correctly), where turning the avatar left or right causes the landscape around him to be rotated. How feasible is it to expect a frame rate of 60+ using Java 2D, with the opengl pipeline enabled?

I am using a bufferstrategy and a window size of 1024*768. I added the line gr2D.rotate(0.1) in the beginning of my rendering method just to test, which drops the frame rate from about 150 to 3, and causes alot of the colours to appear wrong.

Is there a better way to do this?

If you use the correct image types, and opengl acceleration is functioning 60fps will be easily obtainable.

Ok, its working nicely and all that… using tile sizes of 512, it draws at about 450 fps, but with a tile size of 64, it drops to about 75 fps at 1024 * 768 res. It that normal? Didn’t realise calls to drawImage would be THAT expensive…

Secondly, rotating the whole screen very slightly by say, 5 to 10 degrees causes these ripples to appear as the avatar runs to the sides… is there a way to avoid this?

Ah! Nevermind. Adding hints for render quality made any visual artifacts virtually disappear :slight_smile: