Platform bug with arrow keys + spacebar

Bugs will be moved here once resolved.

Post » Wed Jun 11, 2014 5:56 pm

Problem Description
There's an issue when trying to use a certain combination of arrow keys (left and up) and the spacebar at the same time. So for example, if you wanted to have a player jumping and shooting (with space bar) at the same time the shooting won't occur if the player is holding the left and up keys at the same time

Attach a Capx
https://drive.google.com/file/d/0B_W3QJ ... sp=sharing
edit: zenox98 also has a good capx for testing this, see link in his post below

Description of Capx
simple platform demo

Steps to Reproduce Bug
  • at the same time push the right and up arrow key on the keyboard, follow that shortly by pushing the spacebar while player is still in the air. You'll notice the text at the top changes to "spacebar is down". This is all good and well.
  • now, at the same time push the left and up arrow key on the keyboard, follow that shortly by pushing the spacebar while player is still in the air. You'll notice the text at the top remains "spacebar is NOT down" but should change to "spacebar is down" when pressed. Something is keeping the spacebar from registering while the left and up arrow keys are down.

Observed Result
spacebar tap doesn't register when left and up keyboard keys are down

Expected Result
spacebar tap should be recognized even when left and up keyboard keys are down

Affected Browsers
  • Chrome: YES
  • FireFox: YES

Operating System and Service Pack
Windows 8.1 Pro

Construct 2 Version ID
r172
Last edited by russpuppy on Wed Jun 11, 2014 7:27 pm, edited 1 time in total.
B
63
S
12
G
6
Posts: 456
Reputation: 8,985

Post » Wed Jun 11, 2014 6:11 pm

It actually works OK for me, showing 'Space is down' as expected when moving left or right.

Remember to check on different keyboard if possible, as certain keyboards can cause this issue to manifest.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
87
Posts: 5,490
Reputation: 60,266

Post » Wed Jun 11, 2014 6:14 pm

hm. I tried a different keyboard and it still seems the same...

@zenox98 Do you keep the left arrow and up arrow pressed (don't let go of) as you push the spacebar?
B
63
S
12
G
6
Posts: 456
Reputation: 8,985

Post » Wed Jun 11, 2014 6:16 pm

Yes. I even set timescale to 0.25 so it has more time to see the result and it works every time.

I amended your .capx to test for all 3 conditions, and to set a text box if all 3 keys are registered. Works every time for me.
You do not have the required permissions to view the files attached to this post.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
87
Posts: 5,490
Reputation: 60,266

Post » Wed Jun 11, 2014 7:25 pm

@zenox98

interesting, thanks for testing that and the new capx. I can't get the "left ok" to show up using your capx though I can get the right OK to show up easily. I even tried on another computer (so I've tested both windows and mac chrome browsers, also tried safari on mac). What operating system and browser are you on?

no big deal but there is a minor typo in your capx, need to change txtLeft to txtRight in the last action of your last event
B
63
S
12
G
6
Posts: 456
Reputation: 8,985

Post » Wed Jun 11, 2014 7:49 pm

Using r172 C2 64 bit version on Windows 7 Home Premium Service Pack 1 64-bit.

I don't understand it - I feel like I'm missing something, but it definitely works in both directions for me.

Hopefully, others (come on people!!!) will test also.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
87
Posts: 5,490
Reputation: 60,266

Post » Wed Jun 11, 2014 8:26 pm

B
55
S
29
G
19
Posts: 1,520
Reputation: 25,670

Post » Wed Jun 11, 2014 8:41 pm

thanks for the link @ramones. Yeah with the test on that page spacebar doesn't register when I am holding down left and up... so sounds like this is a limitation of my computer or keyboard and not an issue with Construct 2 itself
B
63
S
12
G
6
Posts: 456
Reputation: 8,985

Post » Wed Jun 11, 2014 8:44 pm

Thanks for the link, @ramones. I knew about the issue but never knew it had the 'official' term of ghosting.

Maybe the Keyboard plugin item in the C2 manual should add the term and explanation for future reference.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
87
Posts: 5,490
Reputation: 60,266

Post » Thu Jun 12, 2014 10:53 am

Closing as not a bug: not all keyboards can reliably detect three simultaneous keypresses. Some other combinations using keys from different parts of the keyboard may work better, e.g. using letters, spacebar, arrow keys, ctrl/shift etc. separately. You must take this in to account when designing games. It happens at the hardware level so there is nothing any software, browser or operating system can do to avoid this.
Scirra Founder
B
399
S
236
G
89
Posts: 24,541
Reputation: 195,426


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 3 guests