Why are touch events destroying my Android framerate?

前端 未结 5 1800
傲寒
傲寒 2020-12-25 15:44

I\'m developing a game for Android. It\'s got a lot going on but is running reasonably smoothly. That is, of course, until the user touches the screen.

While they\'r

5条回答
  •  北海茫月
    2020-12-25 16:17

    Perhaps a somewhat obvious solution, but... have you tried only handling about 1/10 of them? If you're doing processing that's triggered every 10ms on the UI thread, that's likely going to slow down the framerate, yes. So what if you just accumulate a counter somewhat instead and only do any processing once that's gotten past some minimal threshold?

提交回复
热议问题