/!\ Shooting bug in "Shoot!"

Subscribe to /!\ Shooting bug in "Shoot!" 10 posts

Sign in to reply


 
avatar for oOKadOo oOKadOo 26 posts
Flag Post

My code is about done in my attempt to make a game for this contest. I figured out I had a weird issue with my ‘ships’ shooting capability. Guess what, Shoot! seems to have the same problem. Maybe bug or problem aren’t the right way to express this issue.

If you play Shoot! (or have a game with the exact same coding _‘..), you’ll notice this:

It is possible to press those combinations of keys at the same time and everything will work just fine.
[SPACE][UP]
[SPACE]
[DOWN]
[SPACE][LEFT]
[SPACE]
[RIGHT]
[SPACE][UP][RIGHT]
[SPACE][DOWN][LEFT]

But, when you get to press those combinations of keys at the same time, depending of the sequence you hold those keys, the ship will not move or shoot.
[SPACE][UP][LEFT]
[SPACE][DOWN][RIGHT]

Anyone noticed it yet? Anyone was able to fix it? I’m not, and I find this issue pretty random. I can’t even understand how this different behaviour can occur in two case that appear to be similar to me.

P.S. If you can’t shoot by holding space, try to repeatedly press hit while trying arrows combinations.

 
avatar for oOKadOo oOKadOo 26 posts
Flag Post

Oops, wring keys combinations. The right ones are:

It is possible to press those combinations of keys at the same time and everything will work just fine.
[SPACE][UP]
[SPACE]
[DOWN]
[SPACE][LEFT]
[SPACE]
[RIGHT]
[SPACE][UP][LEFT]
[SPACE][DOWN][RIGHT]

But, when you get to press those combinations of keys at the same time, depending of the sequence you hold those keys, the ship will not move or shoot.
[SPACE][UP][RIGHT]
[SPACE][DOWN][LEFT]

 
avatar for Aghannor Aghannor 125 posts
Flag Post

I think it might just be a bug with flash itself, and not the game. For me, the only combo that doesn’t work is:
[SPACE] + [UP] + [LEFT]

I did some debugging to see the values of Key.isDown for all five keys. For all the other three-key combinations, all three key values are true. For the one that doesn’t work, though, only two key values are true, instead of three. So basically, flash just isn’t recognizing that all three keys are pressed, for whatever reason.

 
avatar for explodingferret explodingferret 1505 posts
Flag Post

Actually, more likely it’s a bug with your keyboard. Most keyboards (except very high quality gaming ones) have trouble with holding three or more keys down at once in same cases. It only ever happens when at least two of the keys aren’t modifiers. So, Shift+Control+Alt+Windowskey+AltGr+someletter will probably work, but to take an example from my last keyboard, Control+S+A won’t work.

Try changing your shoot key to Shift or Control or something, and hopefully that should magically fix it.

 
avatar for oOKadOo oOKadOo 26 posts
Flag Post

Thank you for taking the time, this is what I’ve also noticed. I still think their has to be a way to fix this. A different way to call the Key.isDown function in some kind of ‘for’ loop maybe. I haven’t found a solution yet, but this is really annoying. I’m pretty sure I’ve seen similar games without this bug, Kongregate could probably fix this in Shoot! before the end of the contest if we get to find a solution.

 
avatar for oOKadOo oOKadOo 26 posts
Flag Post

Thank you for your reply explodingferret, this answer could be it! ;) I’ll try to see this when I get home (I have a 250$ keyboard lol ^^). Meanwhile, if anyone else has an idea, you might want to point it out!

 
avatar for Kuzmin Kuzmin 17 posts
Flag Post

G15 has issues with three keys too, you wouldn’t believe it..
You should try making a game not needing the hold of three or more keys at the same time anyways, most people don’t have expensive keyboards.

 
avatar for explodingferret explodingferret 1505 posts
Flag Post

Two keys is usually fine, two arrow keys and one of (shift, control, alt) is usually fine. Despite what I said earlier, one of (control/shift/alt) and two of (W/S/A/D) is usually fine too — my example of that not working was for a VERY old, VERY cheap keyboard.

If in doubt, you can always add a menu for changing the controls. In any case I get a bit frustrated with games that don’t do this, actually, since I don’t use a qwerty layout so WSAD is completely useless for me. :)

 
avatar for oOKadOo oOKadOo 26 posts
Flag Post

Haha great tip, I’ve never eared anybody complaining about ‘wasd’ controls. I’ll had this option in my menu. ;-)

 
avatar for InvncibiltyCloak InvncibiltyC... 2 posts
Flag Post

I looked this up and found the problem (its the problem on my keyboard atleast)
There is a matrix of keys all wired together on your keyboard and out of these (usually about 12 on mine) you can only press 3 (or 2 if one of them is a special key). So to get around this, use key that are in a different matrix from each other.
Here is the link to where I found all of this. There is a utility on that site that shows you what keys you are pressing, and you can figure out what keys are matrixed together.

Also, from my research of ps/2 ports (the non-USB connector for keyboards) it show that a keyboard can only transmit 8 bytes of data per clock cycle (~15 mhz). From this i guess that you can only hit 4 buttons at a time(standard keys take 2 bytes of data to transmit – certain others like the arrow keys cost 4 bytes to transmit. You can find these scan codes here). This is only a guess based on information i have gathered – you could transmit 4 keys one clock cycle, then 4 more the next (although it seems that this does not happen). I dont have a ps/2 keyboard so i cannot test this – dont quote me on any of this last paragraph.

Sign in to reply