• Content Count

  • Joined

  • Last visited

  1. Another solution to the latency problem as described in many forums and blogs is use a constant lag between the server states and client states. For example suppose server world state is at S_t at time t but the clients will not try to render S_t but it will try to render S_(t-100). The clients will have some earlier updates from the server using which the clients and interpolate the object positions at time t-100. and as the clients have atmost 100ms to get the next update packets from server every object movements will be smooth and same for all clients (as long as latency for each client < 100ms). Human brain can quickly adjust to this constant lag. All the other methods for extimating latency and client side predictions can cause jerkineess due to the random fluctuations of the RTT. If you don't understand from this poor explanation you can checkout articles and blogs like this one and others can be found easily through google. But in all the blogs its is done for a simple case like moving a cube specially no game engine is used for simplicity (I guess ). Now I an trying to implement this in my phaser game and don't know how to do it. I want to use phasers arcade phy engine for caculating the player physics but the rendered should use the earlier data for rendering. I counldn't find any example where this method is used with phaser in nice modular way. TIA