So I'm new to android development and Ouya development as well, but well acquainted to Java.
I've made a simple game that randomly generates a level with ~200 different objects. Each one draws a rectangle to the canvas. Unfortunately, when that number of objects (200) exceeds around 70, the framerate starts to drop. At 200 objects, it drops by about 12 frames. I also tried drawing half of them as a bitmap, and framerate dropped to 5fps.
So my question - is this generally a problem on Android and should I try to learn OpenGL, or is it possible to fix this without jumping into OpenGL?
Comments
www.yummycircus.com
You'll want to look into switching to OpenGL - it will be WAY faster.
Website
What this means for you, is that you need to learn about shaders, OpenGL ES 2.0 only supports Vertex Shaders and Fragment Shaders; you can think of it like this, Vertex Shaders do the Transformation of Vertices from Model/World space to View/Screen space and Fragment Shaders do the Lighting of the Screen space pixels covered by the primitives represented by your on Screen Vertices, (hence the term Transform and Lighting). In reality it's not as clear cut and dry as that, as different parts of the rendering pipeline can be shuffled around, but it's a good place to start.
The other thing you need to decide is whether you're going to implement OpenGL ES 2.0 in Java or using Native code, (C++), the links I have provided for you are mainly Java although I personally do everything in C++ for performance. Some of these links are also API/Architecture specific, but don't worry about that, the Shader specific bits is what makes them useful.
http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf
http://www.khronos.org/opengles/sdk/docs/reference_cards/OpenGL-ES-2_0-Reference-card.pdf
http://glslstudio.com/primer/
http://www.opengl.org/sdk/docs/tutorials/TyphoonLabs/
http://www.raywenderlich.com/10862/how-to-create-cool-effects-with-custom-shaders-in-opengl-es-2-0-and-cocos2d-2-x
http://www.raywenderlich.com/3664/opengl-es-2-0-for-iphone-tutorial