Ok, I have a few questions I’d like some comments on. I’m doing some things in my game I’m making that I don’t think are very effecient, but I don’t know of any other way (little experience), so any comments, hints and some help on how to do stuff RIGHT is appreciated 
This is all Java2D, and my game is a 3rd-person-strategy-shooter, meaning that you pilot a small unit with your keyboard and mouse and blow up things 
-
This tank you play, is composed of 2 PNG/TRANSLUCENT images. The “tank base” and the “tank tower”. The tower looks at the position of the mouse-pointer. You can rotate the tank left/right using the A and D keys, while W moves you 3 up, S moves you 1 down (since it’s slower to go in the back-gear).
QUESTION: Anyway, there is a lot of rotation here, rotating the tower and the base, according to how the tank is. Is this a very effecient way? -
You can also shoot by clicking the mouse buttons. You shoot some sort of a missile or bullet, which is a PNG/TRANSLUCENT image also. Anyway, when you shoot the bullet needs to be rotated to match the direction. So, each time I fire I create a Sprite, and when that sprite draws the image it rotates it everytime. I notice that when I shoot alot of bullets, the game slows down a bit. But I need to do this because the bullet can be travelling toward any x,y point from the tank location, and the bullet needs to be rotated to match the direction.
QUESTION: I know this isn’t very effecient, but I don’t want some ugly bullets. I’ve tried scaling down the quality of the graphics, but any better way to do this?
- In this game there is this Gun Tower, it shoots bullets (sprites) and it uses the same rotation for them as the tank does.
This gun tower composed of a TOWER and a BASE. The tower rotates on it’s base, and that tower has a cannon that needs to look at the tank you’re piloting. While this Gun Tower is idle (tank not in range) it rotates on it’s base.
All this is related to the rotation of translucent png high quality png images.
My idea: I was thinking about having some sort of RotationSpriteCacher, to store the rotated images, so they don’t need to be rotated again, but simply retrieved from the rotationSpriteCacher and then drawn.
Any thougs?