Realtime Multiplayer Game question...

If I have a two player game and let’s say it’s just two tanks shooting at each other, if both tanks have hardly any life and they both shoot at each other at almost the same time if there is a lag on either sides internet connection it could have the possibility of saying on Players 1’s screen that they won while Player two will see that they had the final shot and won as well.  

When it comes to games where physics or things like the example above happen, I imagine there will times when on screen you see your bullet hitting their tank first (and thus you win) but because of a momentary lag, it’ll get to the server a bit late and thus player 2 will win.  

I hope this scenario makes sense.  I’m wondering how this is typically handled.  I’d rather not have the server do all the logic.  Also, sending a timestamp on each bullet fired seems too much.  Ideas?

I think timestamps are very standard when passing messages between the server in this case.  Most of the time this scenario has to be handled on the server though, with calculations for latency, etc.

Have you considered using a 3rd party service to handle that aspect?

Cheers.

I think timestamps are very standard when passing messages between the server in this case.  Most of the time this scenario has to be handled on the server though, with calculations for latency, etc.

Have you considered using a 3rd party service to handle that aspect?

Cheers.