You Are Here:

Community: Developer Discussion Boards

#1 Old KeyPressed on two or more keys - 2003-02-07, 14:54

Join Date: Mar 2003
Posts: 1
dpiazza
Offline
Registered User
Hi
can anybody help me, please? I'm developing an arcade game. I got my sprite movin' but I can't manage two (or more) keys being pressed by the player. For example going left-upward while firing. I got my routine that works fine on the Default Color emulator in SunOne Studio 4 CE Update1, but not on the Nokia 7210 emulator. To let you understand I tried this,
Pressed LEFT key and kept pressed (the sprite moves left), then
pressed UP key and kept pressed (the sprite keeps on moving left),
released LEFT key (the sprite starts moving up).
It seems like only one event at a time is processed.
I thought that's because the keyPressed method runs in the main thread of the Listener, so I tried to use a separate Thread, but nothing changes. I don't understand why the same key pressing sequence as above works as should do in the S1 emulator.
Thanks in advance to any help.
Davide.
Reply With Quote

#2 Old RE: KeyPressed on two or more keys - 2003-02-10, 06:17

Join Date: Mar 2003
Posts: 8
lnx
Offline
Registered User
not all nokia phones can handle simulateous key presses...
I saw a nokia comment about it in a game programming .pdf document...

lnx
Reply With Quote

#3 Old 2003-04-20, 04:33

Join Date: Apr 2003
Posts: 1
x0001346
Offline
Registered User
I'm also developing the same kind of game for the 7210 and have reached the same limitation.

One solution that I think of (but haven't allready tryed) was to associate a timer with each game action that would consider that the key was still pressed for some time even if it was already released, this allow the ship to move and fire at the same time.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia