开发者

can I have same running speed of game on both the android emulator and the android device?

When I run my simple 2D game on android emulator it runs slow comparatively to the actual android device,SO THE Question is that how can we ensure that the speed we have adjusted on the android emulator for my game will be the same on actual android device also.

Is there any facility on android opengl es like delay(time) function as on old turbo compilors SO i can 开发者_JS百科ensure for my speed of the characters?


I think there's two things you can do:

  • Update the positions etc. on the basis of the amount of time passed by using System.getTimeMillis(), if you're updating from the rendering thread.
  • Start an update timer thread that ticks at a fixed interval and update from that thread.


You can't (I don't think). The ONLY true way to see how it runs on an actual device (and adjust accordingly) ... is to run it on an actual device. On my first Android project I went months developing, using the AVD to test (mainly because I did not have the money for a real device). Once I got a device, there were a LOT of things that had to be changed. Now I generally test on my real device as its faster anyway.

As far as your second question I am not sure.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜