Threads on Andriod...

Discussion in 'Game Development (Technical)' started by Jamie W, Sep 4, 2012.

  1. Jamie W

    Original Member Indie Author

    Apr 16, 2006
    Likes Received:

    I'm porting a game from iOS to Android. Going very well, just a small issue with the touch inputs; they feel quite sluggish and slow to respond.

    Someone mentioned about having different threads for UI and for touches. I'm not sure (still new to Android). What's the best way to go about things on Android, in terms of threading?

    My game is fast to update, typically 60FPS etc.
  2. pepp

    pepp New Member

    Jun 12, 2012
    Likes Received:

    I use 2 threads : 1 for rendering (using GLView callback onDrawFrame), 1 for updating the game (using a new Thread()).
    Touch inputs are received in the Activity onTouchEvent callback (which I think runs on UI thread) where I simply store them. Then inputs are processed in the next game update loop.

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer