java - Android touch event list and garbage collector -


my game has been stuttering because of gc , ranges 40ms 140ms. game not creating new objects or in update or render threads i'm pretty sure project clean except one. in update method have list<touchevents> touchevents = gettouchevents(); pretty sure causing gc kick in gc every time i'm moving around requires me touching screen (using action_move event). how optimize or prevent this?

edit: i'm starting think has fps limit method. i'm assuming since limiting fps 30 gc not have enough time without interfering game. came theory after took limiter off , ran game @ full 60fps. game goes smooth when running @ 60fps not @ 30fps. ideas?

personally wouldn't recommend capping fps. instead, let run fast can , refer elapsed time when doing movement , physics.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -