Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

New answers tagged

0

Transmitting the full image contents of the player's screen across the network to the server every frame is likely to be rather performance-intensive, not to mention bandwidth-intensive. A much more scalable approach is to instead transmit the position and orientation of the player's camera. Then the server can spawn its own camera for each player in its ...


0

I think maybe Redis could solve this. Redis is fast and even if there are hundreds of simultaneous requests, redis will work out. Example (its javascript, you can convert this into PHP) // you query database, calculate random damage etc in this method, to have a final damage. var player_damage_dealt = calculate_player_damage() // boss health atomicly ...


1

Do the host "decides" the enemies state? This is one way to do it. Which I recommend, but there might be games which work with other methods. Basically I'm asking whats the best way to handle a 4 player p2p game with many enemies on screen. There is no best way.The simplest way to do it would be to have one host control everything about the game, and ...


1

In a typical multiplayer game, clients are not all authoritative about the outcomes of their actions. They say what they're trying to do, not what the outcome was. This avoids the classic playground bicker in imaginary play, "I hit you!" "Nuh-uh! You missed!" - if both players are equally authoritative about the outcome, then we can't resolve who's right. ...


Top 50 recent answers are included