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. Interesting problem

Hi developers.............


                Thanks for the replies.   I have a problem from last
few days. I want to delete sms from my inbox. I have used this code
for deletion.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Uri uri = Uri.parse("content://sms/inbox");
Cursor c1= getContentResolver().query(uri, null, null,null,null);
      int thread_id = c1.getInt(1);

        getContentResolver().delete(Uri.parse("content://sms/
conversations/" + thread_id),null,null);

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

But it dose not work . Please help me if any thing wrong and give me
the right code. Thanks in advance .

 
Suman.
--~--~---------~--~----~------------~-------~--~----~

2. what will this INTEL move affect Android?

http://www.businessweek.com/technology/content/jan2009/tc20090125_296994.htm?chan=technology_technology+index+page_top+stories

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

3. Start an activity and return back to original activity

4. Exception in thread "main" java.lang.NoSuchMethodError: main

5. Messaging back button bug

6. Start an activity and return back to original activity

7. Unable to install "Google Notepad" application