I'm working on a small game where I need to update the graphics often.
I've got the double buffering right afaik, but there's a problem with RepaintManager spamming paintDirtyRegions so much that the graphics are flickering.
I tried googling for paintDirtyRegions and RepaintManager, but I didn't see any useful information on this issue. I don't understand why the method is spammed so much and I have no idea how to deal with it. I'm not even sure if this issue is related to paint() or something else. The problem did go away when I disabled paint(), but the problem doesn't go away when I stop calling for paint() or repaint anywhere.
Can anyone help me get reduce the spam and remove the flickering? Have I done something wrong, or do I lack something in the application?
I can post my code when I know which part is useful for you to see
My paint() is pretty long with lots of drawstring, fillrect and drawimage.