Aaron1011 / beamwars

A multiplayer in-browser game, based off of the Mac game BeamWars
beamwars.com
GNU Affero General Public License v3.0
0 stars 0 forks source link

Beamwars

A real-time multiplayer game written in JavaScript.

Scenarios

Due to newtork latency, a given player may receive a turn event for another player far in the future. This causes a turn to be inserted retroactively into the player's view of other players.

This scenario shows a simple game, where a retroactive turn is inserted for Player1's view of Player0.

Time 0.1Time 0.1Time 0.2Time 0.3Time 0.4
Player0:
Server:
Player1:

The following scenario is a more complicated case. Due to network latency, Player0 retroactively inserts a turn for Player2, which appears to cause a collision. However, Player0 had no idea that Player2 had turned until the turn information arrives. It's unfair to create a collision, because from Player0's perspective, he did nothing wrong.

Time 0.1Time 0.2Time 0.3Time 0.45Time 0.6Time 0.75Time 0.8
Player0:
Player2:

This final scenario is the opposite of the above scenario. From Player0's perspective, Player0 has collided with Player3. However, Player3 had turned earlier, causing the collision to be avoided. Player0 had the necessary information to avoid a collision, but did not. So, even though from the perspective of all of the other players, no collision occured, Player0 will broadcast a collision event.

Time 0.1Time 0.2Time 0.3Time 0.55Time 0.7Time 0.75
Player0:
Player3: