1. The game interface view is generally surfaceview or directly inherited from view
2. You can receive the motionevent clicking position in the view. getrawx () returns the screen coordinates, while getx () returns the coordinates in the view.
3 bitmapfactory: Do not call bitmap loading methods repeatedly. Each call consumes a lot of memory. It is best to put it at initialization.
4. Excessive memory consumption ProgramThe system automatically exits and displays the low memory information.
5. When detecting bitmap pickup, you can use a custom circle or square to replace the image shape, which facilitates Collision Detection and pickup.
6 when using matrix to locate the bitmap, pay attention to the order of the combination. Otherwise, an incredible problem may occur. Usually it is first deformed, then rotated rotate, and finally moved the translation
7 when using surfaceview to draw a graphic, you must ensure that the unlock operation of the canvas is executed, preferably put it in finally.
8 it is best to define all static variables in the Custom Application derived class. application is the beginning of the program, not the activity.