RotMG PvP basic HowTo (private server)
It is really simple. As you all know, when the client receives an ALLYSHOOT packet, it displays a projectile that can't hit players.
In the same way, when it receives a SHOOT packet (I think it's this one, not sure tho) it displays a projectile that can trigger the hit detection on players.
To get PvP working, we should just need to send SHOOT packets instead of ALLYSHOOT ones, and treat them as enemy projectiles (already coded).
This image shows the process (basically):
http://i.imgur.com/nDksICc.png
That's it. We could add some more features, but as of now I'm busy on other things.
Just wanted to tell you guys that it is possible. Feel free to try it out by yourself.
PVP isn’t possible because of the way the entity interpolation works
There are only 5 server ticks a second and every player sees a slightly different rendering of the game world, because each player sees itself in the present but sees the other entities in the past, including the other players.
Entities are rendered on the client between 200-400 milliseconds behind the server, where as the player sees it's self in the present, all other entities are seen in the past.