[r112] Problem with diagonal movement + shooting

Bugs will be moved here once resolved.

Post » Sat Dec 15, 2012 3:58 am

I want to be able to shoot diagonally (using the space key to fire) while also moving diagonally. Up + right diagonal movement works (while holding down the space key to fire), but up + left, down + right, and down + left diagonal movement doesn't work (while also holding down the space key to fire).

Also, if you're already moving up + left, down + right, or down + left, and then start pressing the space key to shoot (while still moving diagonally), it won't shoot, but if you do the exact same thing while moving up + right, it will shoot.

I don't think it's something that I'm doing wrong (event-wise and etc), since I've also seen this very same problem happening in other people's tutorials, and capx files with their events and etc, set up in both similar, and different ways. It seems to be an actual bug with the interaction between the keyboard controls, and the bullet behavior. Diagonal shooting while also moving diagonally works fine if you're using mouse buttons to shoot, but not if you're using the keyboard controls/keys to shoot.

Here's a modified version of the default top-down shooter template with the diagonal movement + diagonal shooting problem using keyboard controls:

Diagonal Movement + Shooting Bug Version 1

Here's another capx file that doesn't use the 8 direction movement plugin like the first capx file uses, but instead uses custom made movement using instance variables, and events. In this capx file, you can only shoot forward, which is intentional, but it still has the same problem that I described in the second paragraph. Also, in this capx file, you're suppose to be able to shoot forward no matter what diagonal movement you're using (up+left, down+right, etc), shooting and moving up + right works fine, but up + left, down + right, and down + left doesn't.

Diagonal Movement + Shooting Bug Version 2

I'm using:
Construct 2 beta release r112
Windows 7 (64-bit)
NVIDIA GeForce GTX 560 Ti with the latest driver (306.97)

Browsers tested in:
Chrome (Version: 23.0.1271.97 m)
Firefox (Version: 17.0.1)
Internet Explorer 10 (Version: 10.0.9200.16439)Blake2012-12-15 05:08:48
B
13
S
3
G
5
Posts: 6
Reputation: 3,392

Post » Mon Dec 17, 2012 3:00 pm

Closing as not a bug: most keyboards cannot reliably detect three keys held down simultaneously. This is due to the hardware design and it is not possible for any software to fix this. It also varies depending on the keyboard: mine can shoot while going top-right, bottom-right and bottom-left, but not top-left!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests