Screen touches during game

by Neilz » Tue, 15 Jun 2010 18:46:30 GMT


Sponsored Links
 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.

--



Screen touches during game

by Leigh McRae » Wed, 16 Jun 2010 04:58:44 GMT


 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



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 --


Sponsored Links


Other Threads

1. AndAppStore.com Download Chart (was OI News Reader available)

Peli,

Your wish is my command.... 
http://andappstore.com/AndroidPhoneApplications/chart/

Unfortunately you're running third at the moment with 106 downloads 
behind the US constitution (145 downloads), Opera Mini (135).

Al.







-- 
Al Sutton

W: www.alsutton.com
B: alsutton.wordpress.com
T: twitter.com/alsutton


--~--~---------~--~----~------------~-------~--~----~

2. Google Android -- so far, a haven for USELESS apps

http://www.guardian.co.uk/technology/blog/2008/oct/23/google-android-apps

anyone agrees???

--~--~---------~--~----~------------~-------~--~----~

3. Russian spam from Android Challange submission

4. Fax Modem

5. Detecting SCREEN_OFF

6. Getting the content of a web page.

7. bootloader and Linux kernel development help