The shooting is a little weird, I fired several times at a tank, and the bullet went right through him. And other times I fired and completely missed and he got hit.
The tanks are also on teams. If you shoot at a tank of your own color, I don't think it's possible to score a hit (no friendly fire).
I played it for about two minutes and I'm hooked. All the upvotes.
A well-written game can account for lag and prevent those kinds of glitches from happening...
There isn't browser support for UDP. This makes glitches much more likely.
There is, you can use WebRTC Data Channels to achieve it. It's not trivial, but it's possible.
WebRTC is not supported by Apple platforms nor by most mobiles where this problem is most visible.
Solution would be to have servers on local data centres as well as good implementation of dead reckoning.
Although networking code been written in less than 8 hours initially, and since then not reviewed :)
yea the collision detection is off, i was shooting through walls half the time and not the other half. which shows it's not a lag issue.
That is only visual glitch as message of `bullet hit wall` get received a bit later than it actually happens on client. Although it won't hit player behind the wall even if it looks like it will.