Hot answers tagged

3

Just as a heads up, most keyboards have a finite limit of keys that can be pressed. For example, I have an Asus Transformer Book and you can only press around ~5 keys at a time. Some keyboards also won't allow more than a few keys pressed if shift or control is being pressed. (Like my Transformer Book...) And yes, most of the time, this is hardware limited, ...


2

What you can do is not to send to the server the game statuses(like positions), just the clients inputs. So on client input (lets say that clientA press 'fire' button), you can send this event to the server ('fire from clientA'), then the server broadcasts the event to all clients and are the clients whom finally make the changes, with the Phaser engine (...


2

What you are trying to do is far outside the usual use-case of off-the-shelf script engines. Scripting engines use lots of optimization tricks to run code as fast as they can. But that means the programmer can not know for sure how fast code will actually run. The runtime behavior could also change when you install some minor update to the scripting engine. ...


1

As others have pointed out, you can't be sure the player has a keyboard with anti-ghosting so this simply wont be possible on most non-gaming keyboards. Regardless, I think the best solution would be to let the players decide when the game starts. Everyone positions their hands where they're comfortable then each player is prompted, one by one, to press ...


1

Here's a quote by Sam Jansen from a comment on gafferongames.com: Speaking as a network researcher and not a game developer, the conclusion to never use TCP and UDP together seems a bit strong. TCP will only have packet loss if it is sending too much data; in some ways just like the UDP data you are sending. The difference is you have no direct control ...



Only top voted, non community-wiki answers of a minimum length are eligible