I believe there's no common approach to games development. Every game is unique and requires its own design. Therefore, it's really depends on the game whether you should span 2 or more threads for your logic and how excactly are you going to handle UI updates.
On Nov 12, 12:17 am, Neilz <neilhorn...@googlemail.com> wrote: > Hi all. I've been reading the developer guide, the sections on > designing for performance and responsiveness. It's great stuff, and > I'm going to go through all my code and refactor everything I can to > meet these suggestions. > > One line stood out for me: "For games specifically, do calculations > for moves in a child thread." > > Could someone possibly elaborate on this a little? If you had a game > where the screen was being refreshed continuously, with calculations > being made on every refresh, does this mean starting and ending a > thread every time this happens? Or is one thread created at the start, > which stays open for the duration of the game? > > And would this be an inner class extending Thread with a run() method > as usual, or are there better ways of handling it? I recently used an > "AsyncTask" to handle a background task, would that be something that > could be of use here? > > Many thanks for any help. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en