As SpriteMethodTest says there are many ways for drawing sprites. First i tried canvas and had some performance problems. Than i decided to learn opengl. I made my first achievements using GL11Ext extension. but you know by default when you draw textures they are flipped and the x and y axis have zero on the bottom left corner of device screen (in landscape mode) not like the canvas and you cant rotate sprites.
Than i tried to affect this axis view using GLU look at. But had not effect.
Than i wanted to rotate my sprites and had not effect cause of GL11Ext as they say.
So i have the major stackoverflow condition now and the basic question is:
1. Which method to use to achieve ZOOMING, ROTATING and BOUNCING effects on sprites and for LOOKING AT X AND Y AXIS IN OLD SWEET WAY [(0,0) IS ON TOP LEFT IN LANDSCAPE MODE] ?
2. AND IS THERE SOME SPRITE CLASS EXAMPLE IN THE UNIVERSE WICH USES ONLY 1 GOOD WAY OF SPRITE RENDERING ? (SpriteMethodTest confuses me much)
EVRIKA !!!
I was allmost killing myself ! after 3 days of leaving Canvas and learning OpenGL methods to implement game engine.
The web is full of OpenGL tutorials full of trash and many of them are unfinished and many of them lead to wrong way for 2D OpenGL game engine implementation methotds. The big wrong point is using G11Ext for making games. AS THEY DONT ROTATE : D
Annd annd then i found this tutorial from other tutorial which i found from youtube game sample video link lol:
not to confuse viewers here is
Chapter 1: http://obviam.net/index.php/opengl-es-with-android-switching-from-canvas-to-opengl/
Chapter 2: http://obviam.net/index.php/opengl-es-android-displaying-graphical-elements-primitives/
Chapter 3: http://obviam.net/index.php/texture-mapping-opengl-android-displaying-images-using-opengl-and-squares/
Annd just 15 minutes ago I discovered the way I can ROTATE, MOVE AND RESIZE shapes with its sprites ! ! ! hahah
So as many of readers are asking after reading this GREAT tutorial how to move and resize and rotate sprites. So i worked out some code from this mess of examples and tutorials:
This class is used for some vertex manipulations
and this class is used for drawing shape with texture able to move rotate and position
and the main thing how to set camera so that 1 opengl unit == 1 pixel annd how to load textures
and some usage
the main thing here i wanted to implement and implemented is that the X and Y axis are like in canvas:
I ll write some full tutorial after this and I like to announce that i achieved all goals i wanted to achieve i.e: X axis on top, Y axis on left, opengl unit = pixel, set size of object in pixels, rotate object, move object everything in pixels. now i ll handle animating sprites and make them in finer classes and thats the new 2d opengl game framework basis...
discovering this functions helped me tutorial http://www.morrowland.com/apron/tutorials/gl/gl_matrix.php
So many thanks to this blog for pointing me out the only true way...
+1 android simpliest 2d opengl game engine in 1 week...
happy mind blowing...
:P
Edit: After year I have a nice framework https://github.com/hazardland/game.android using concepts described here and sample game with any possible framework usage examples here https://github.com/hazardland/ferry.android (view screens on market https://play.google.com/store/apps/details?id=hazardland.borani)