Original Post
so i've spent a few months now writing a Java2D pure-java game. one of the requirements of the project is to run completely within the security bounds of an applet, meaning no native library bindings (JOGL, LWJGL), and most likely no runtime JVM performance flags (although we can at least ask users to manually set these themselves). the project assumes a minimum of java 1.5. now the problem: performance is horrible as expected but it is enough to run our real-time game. recently i ran into a technical hurdle -- screen fading for screen transitions. as it is, i've implemented it as a Rectangle2D being drawn over the screen while interpolating its alpha values. doing so causes the frame rate to drop to about 1~3fps, where the normal frame rate is around 60~80fps. does anyone have any ideas for an alternative method of performing a screen fade? the only other solution i've thought of is to make an image the same dimensions as the display, and using a Composite effect to achieve the fading, however without being guaranteed that the sun.java2d.transaccel flag will be set, this might yield even worse performance.