I use a double buffered queue. The event thread receives the touch event. Generates a game specific touch event (allocated from a freelist). Writes the event into a double buffered queue that uses sync locks. Then the main game logic drains the queue and flips the buffer before processing the game simulation is updated.

You really doing want the event thread responding to input.

Leigh

On 6/15/2010 6:45 AM, Neilz wrote:
Hi all.

What's the best way of intercepting screen touches and coords during a
game loop? At this point, I don't have a View from my main.xml file,
so the normal OnTouchEvent doesn't apply, as far as I can tell.

What's the usual procedure for this?

Thanks.


--
Leigh McRae
www.lonedwarfgames.com

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to