At the moment i load the image strip(anywhere from 7 - 56 frames) using an image manager class. Then when some other class wants to get the image, it gets a reference to the image(every frame) and then use
to draw the current frame.I have tested and tested my code and found this is where the slow fps is coming from so my questions are:
1) Whats a better alternative to drawImage?
2) Is my image manager class a good idea(ie getting a reference every frame, probably not a good idea)?
3) Any other suggestions??
Assuming you are not doing this alreay you could copy your imapge strip to an optimized image format by using the...
and the copy your image to that and use it insted of your loaded image. The problem with this is it does not work for semi-transparent images. So if you don''t need transparency Just make a bunch of companent.createImage(..)''s and drawImage(Image,sx,sy....) into them. Them your drawing should speed up.
If not you can check my previous thread about drawing speed for alternatives to drawImage, but they are not for the faint of heart. I''m working on an abstraction layer that should make it easier.