-
Maximum Key Input?
I know when my friend and I are playing some Metal Slug on his laptop, our actions are constantly interrupted because the lappy can only handle a maximum of 4-5 key inputs, and anything else gets locked out.
So my question is this, if I were to make a Flash game 2-4 player, where every player uses the same keyboard (Player 1 WASD, Player 2 YGHJ, Player 3 OKL:, Player 4 etc...), how many keys can be inputted into Flash during gameplay before it starts to lock out keys.
Or does Flash even matter? does it depend on the keybaord, the computer itself, if so are there settings that can be changed...buy more RAM or whatever?
Please and Thank you for any responses.
Why do I have to be Mr. Pink?
-
n00b
code:
onClipEvent(Key.Down()){
trace(Key.getCode());
}
or so and you will see
Last edited by LeechmasterB; 10-28-2004 at 05:00 PM.
I do stuff that does stuff...
J-Force
-
(F)FlickCorp. Productions
hmmm
I don't mean to b mean leech but I don't honestly know if a code is the answer he was looking for maybe like something with words and stuff a lil explanation. But I could be wrong who knows...
-
(F)FlickCorp. Productions
Re: Maximum Key Input?
Originally posted by Rewrite
I know when my friend and I are playing some Metal Slug on his laptop, our actions are constantly interrupted because the lappy can only handle a maximum of 4-5 key inputs, and anything else gets locked out.
So my question is this, if I were to make a Flash game 2-4 player, where every player uses the same keyboard (Player 1 WASD, Player 2 YGHJ, Player 3 OKL:, Player 4 etc...), how many keys can be inputted into Flash during gameplay before it starts to lock out keys.
Or does Flash even matter? does it depend on the keybaord, the computer itself, if so are there settings that can be changed...buy more RAM or whatever?
Please and Thank you for any responses.
and one question do u know how to make games with flash because making a game 4 players is probably hard and u would probly need to know the basics of flash and AS to do it. but if you dont know any i suggest maybe try to make a 2 player then after your success try a 4 player but thats only a suggestion....
-
I'm not exactly sure how 4 player is any harder than 2 player. At the very least wouldn't I just have to copy the code in the player 1 character movieclip and paste it into the player 2 character movieclip.
For example
if (Key.isDown(Key.LEFT)) {
player1.gotoAndStop(2);
}
can become
if (Key.isDown(Key.SPACE)) {
player2.gotoAndStop(2);
}
????
The problem is, if player 1 two keys diagonaly, and so is player 2, and player 3 is trying to move and shoot, and player 4 is trying to move and shoot, wouldn't the ammount of keys being pressed (I'm guessing an average of 2-3 keys a player times 4 = 12 keys at a time) lock out the keyboard while its trying to decide what keys were being pressed first.
Why do I have to be Mr. Pink?
-
Senior Member
Your code should NOT simply be cut and pasted between clips. Make it smart enough to know which keyset belongs to which character/MC and make it generic enough to only be coded once in one place. This is simply an issue of good design.
With that said, I doubt 4 players on a single keyboard is really effective at all. Even two players on one keyboard is a pain in my opinion. Make it true multiplayer over the wire and be done with it
Have fun!
-
·»¤«·
i believe the Flash player has a limitation of 3 character input at max. this is a player limitation, so no matter what computer or keyboard is being used... last i heard at least. that was Player 6, not 7. which reminds me, if its still like that, how about putting that as a request for 8Ball? splitscreen Flash gaming is almost null at this point because of that limitation.
>flashl!ght<
All the normal names were taken.
Ron Paul was right.
-
the thud of the body
wouldn't the ammount of keys being pressed (I'm guessing an average of 2-3 keys a player times 4 = 12 keys at a time) lock out the keyboard while its trying to decide what keys were being pressed first
Yes.
Thats how keyboard works, there's nothing you can do, except if you want to make a downloadable game, that will work with gamepads/joysticks:
use Visual basic or Visual C or whatever to make a program with a flash component inside (flash can't detect signals from devices other than keyboard/mouse). Your little program will detect if the specific button on the joystick is pressed then you pass that info into your flash-based game and work with that...
I did'nt do it myself, but it should not be hard (I inserted swf-movie into regular application, just for the experiment...)
-
·»¤«·
i'd also have to agree with webgeek: more than two players playing at once on a single keyboard is probly not reasonable. definately go interent, easier to find ppl to play that way also
>flashl!ght<
All the normal names were taken.
Ron Paul was right.
-
Making it internet based would be easier to play, but that isnt the easiest thing in the world to create...
The person who gave you that snippet of code to add is was giving you that so you could test it yourself and see when you press all those keys, what ones flash acualy recognized... SO i would suggest trying that yourself so you get a better idea...
Also, i dont think it will allow four players to be hitting keys at the same time. I tried doing that a while ago (flash 5... ok it was a LONG time ago... =)) and even 2 player games where a stretch (granted, my game required alot of key hitting =P).
Hope that helps any =)
Ely
-
Patron Saint of Beatings
Having attempted a two-player volleyball game, I ran into this problem. Flash can only read a certain number of key inputs, but I discovered that number changes depending upon which keys are used.
For example: For my game, to jump, players had to press Up. To jump forward, players had to press Up + Forward. To spike while jumping, while hold Up + Forward, the person had to press another key...
If player one and player two were pressing to jump at the same time, one would jump and the other would not.
However, after I played around with the keys, I was able to get both controls to work.
As for the keys... I don't have the files in front of me, so I can't remember what the keys are...
I know I had to go to Numpad for Player 2 and could only select certain numbers...
-pXw
-
As none of the above replies have come close to answering the question, I'll have a go.
The limit on how many keys you can press simultanously is limited by the keyboard itself - I've found that different keyboards have different capabilities. Cheaper keyboards can handle fewer keypresses, whilst some more expensive keyboards can handle more.
Have a look at this link:
http://216.239.59.104/search?q=cache...%2Blimit&hl=en
Apparently, the limit for all USB keyboards is 6 simultaneous keypresses; this is hard-coded into the USB interface standard. PS/2 keyboards generally fall between 10-20 simultaneous keypresses. Either way, it's not really enough for a complex 4-player game - all you have to do to cheat is hold down 20-odd keys, and your opponent won't be able to move.
More importantly, you can't rely on your audience having decent keyboards.
-
Thanks to any and all replies, this game as I see it will be put together in a short ammount of time using very basic simple/coding (so even if just copy pasting player 1s code into player 2s isn't the professional way of going about it, it's certainly faster). It's for a class project so theres not too many actual worries about how people with cheap keyboards/or 56ks will handle it. I doubt people will use the method of ramming the keys so your opponent can't move because hes sitting right beside you and will probably bop you one on the head for doing so, lol, so its not really so much a problem, I asked because its jsut annoying to accidently interrupt each other.
If someone is wondering why I'm attempting to make a multiplayer game in a few weeks and having the skills have a novice coder...well keep wondering.
Why do I have to be Mr. Pink?
-
·»¤«·
so whats the game going to be? and i hope your classmates are really skinny, if u intend to get all 4 on one keyboard!
>flashl!ght<
All the normal names were taken.
Ron Paul was right.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|