Skip to main content
1 of 2
totymedli
  • 1.3k
  • 1
  • 13
  • 27

Prevent anomalies caused by signal propagation time

In electrical engineering class we learned that signal lines are not ideal, so it takes time for the signal to reach the other end of the cable, and if we doesn't take this into account, it can lead to crazy phenomenons like:

enter image description here

Imagine we have a tank game, where tank1 (played from Europe) shots tank2 (controlled from the USA). In tank1's monitor he sees that tank2 is destroyed, but it takes some (very small but not negligible) time for the signal to reach tank2's monitor. So while the signal travels, he can fire his virtual cannon too, destroying tank1. The signal of this act starts his journey to tank1, before the data that tells to tank2 that he is dead, arrives. This causes the weird phenomenon, that tank1 destroyed tank2, but tank2 still can destroy player1 (despite that tank2 doesn't even exists).

They told us, that we cant solve this problem in the hardware way, we have to prevent this in the software side, but they didn't tell us how should we do this, but I am courious, so how do we/they solve this problem?

totymedli
  • 1.3k
  • 1
  • 13
  • 27