Ummmm, I don't want to sound insulting in anyway but being a complete newbie in game programming I can *assure* you you're about to do something fundamentally wrong. Your game only needs 2 threads - the UI (main) thread, and a secondary which runs your game loop. If you are a newbie as well, you'll need to read a couple of books, or at least a dozen of articles on game programming before even thinking of creating your own game.
Cheers On Mon, Mar 9, 2009 at 5:38 AM, kbeal10 <kbea...@gmail.com> wrote: > > I'm currently designing a game that will be displaying several dice. I > would like to know the wisest course of action. The dice will extend > View (or SurfaceView), so that each will be able to be touched, etc. > My question is should I: > > A.) Spawn one child thread to draw all of the dice (up to 6). I would > do this by writing a class that extends ViewGroup or one of the > Layouts and having it create a new thread. Or... > > B.) should I spawn a new thread for each die? Each die would extend > View, or possibly SurfaceView and have its own thread to perform the > onDraw() (i.e. the LunarLander example). > > Which solution would yield better performance/responsiveness? Would up > to 6 child threads be necessary, or a detriment? > > I'm asking because I understand how I would implement the B.) solution > already. It closely follows the LunarLander example and I have already > implemented another section of the game in the same fashion. Other the > other hand, creating up to 6 child threads seems like it may be a bit > much on resources. However, I am unsure how I would implement a > ViewGroup that does its work in a child thread. > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---