Hi there!
Several days ago i began to learn about Android (and java also). I have written simple graphics engine (learn from LunaLander sample api).
It's structure looks like:
1st thread - gui
2nd - thread of drawing graphics on main view (extends SurfaceView) using SurfaceHolder.lockCanvas() - SurfaceHolder.unlockCanvasAndPost().
Test: in draw circle I call canvas.drawColor(Color.WHITE).
~65fps
Then I draw one jpeg 480x320 and five 200x200 with alpha
~13fps
In other words 350Kpx - it is treshold of gaming usability?
I may be wrong, coz it's just an emulator. I have no G1, so I can't see what fps will be on target platform.
But maybe emulator shows "real" fps, and my app on G1 will run the same slow?
And 2 question:
maybe try to implement sprite draw using OpenGL? Will it be faster? Never touched it before, but if it's really faster I'll try...
Several days ago i began to learn about Android (and java also). I have written simple graphics engine (learn from LunaLander sample api).
It's structure looks like:
1st thread - gui
2nd - thread of drawing graphics on main view (extends SurfaceView) using SurfaceHolder.lockCanvas() - SurfaceHolder.unlockCanvasAndPost().
Test: in draw circle I call canvas.drawColor(Color.WHITE).
~65fps
Then I draw one jpeg 480x320 and five 200x200 with alpha
~13fps
In other words 350Kpx - it is treshold of gaming usability?
I may be wrong, coz it's just an emulator. I have no G1, so I can't see what fps will be on target platform.
But maybe emulator shows "real" fps, and my app on G1 will run the same slow?
And 2 question:
maybe try to implement sprite draw using OpenGL? Will it be faster? Never touched it before, but if it's really faster I'll try...