Writing opengl-es game in real time for Android - some question (optimization)

1.

TIME IN THE GAME: Is there a way to use others and then System.Currentmillis()-starttime>XXto update something in the game? Is it a safe or expensive processor?

2.

In my game I have 20 objects (moving square vertices), when it reaches 60-70 vertices, FPS drops to 30-40 FPS, from 60 FPS. (testing on the Galaxy S i9000). Is there a way for my FPS game to be 30FPS? Is it good to upgrade my game to 30 FPS, or do I need to deal with it? (because there will be lag at a lower FPS - it will be slow)

How can I make my objects work at the same speed at any time?

3.

What is the best way: do physics and all stupp in onDrawFrame, or: start Thread, what does the math do for me? What happens faster and better?

+3
source share
1 answer

TIME In the game: is there a way to use other than System.Currentmillis () - starttime> XX to update anything in the game? Is it a safe or expensive processor?

You must use a temporary delta system. There are many lessons about this. This is a very good tutorial: deWiTTERS Game Loop .

20 ( ), 60-70 , FPS 30-40 FPS, 60 FPS. ( S i9000). FPS 30FPS? 30 FPS, ? ( FPS - )

, . 3D, Vertex Buffer Objects (VBO:s) (, Vertex Array, GPU). , CPU CPU GPU .

2D, VBO:s, draw_texture .

:

  • Vertex Arrays ( ).
  • Vertex Buffer Objects ( 3D, , draw_texture 2D).
  • draw_texture ( 2D, 3D-).

, Android, OpenGL. , , Vertex Arrays VBO:s ().

, ; Google I/O: drawing stuff

, ?

. Android - , , ( , Service ?). , -, .

: stupp onDrawFrame, : Thread, ? ?

( Thread ). onDrawFrame Thread/Runnable.

:

+11

All Articles