Ok, last question about this topic... really
I asked about accelerated images because I have a game that performs poorly.
It's an applet game with an resolution of 640*550, I use int arrays to put all the pixel
data in and calculate with. I hook a surface (the memoryimagesource or bufferedimage to
it to render it to a image which I then draw to the screen.)
I did some tests, I don't sleep or wait my main thread, I only yield to give other threads
a little air to breathe, this should draw as much fps as possible.
When I disable the draw to screen and measure how much the paint is excecuted I should be
able to measure how long the gamelogic takes for each frame drawn.
With the surfaces defined as bufferedimage: 120fps = ~8.3ms per frame
With the surfaces defined as memoryimagesource: 120fps = ~8.3ms per frame
no surprise here. I don't blit the surface to the screen so they should be about equal.
when I enable the draw surface to screen I can measure the time nescesary to draw the image:
With the surfaces defined as bufferedimage: 50fps = 20ms per frame
With the surfaces defined as memoryimagesource: 46fps = ~21.7ms per frame
The bufferedimage is a tad faster than memoryimagesource, this isn't surprising either.
What I do find surprising is that the paint cost about 12ms to perform. Thats over twice the
time needed to do all the gamelogic, which involves the same int buffers (even more) as the
paint should blit to the screen.
How can it be that the paint takes so much processing time? Is there anything I could do to
speed things up? (and yes, I'd like to stick to crappy(?) applets
Is it maybe even possible to accelerate this through jpct or something alike? (is it even
possible to support opengl through applets?)
Thanks in advance!