1
\$\begingroup\$

I'm an hobbist game developer. I'm trying to make a clone of a game like this: http://superhex.io/ to experiment with multiplayer online.

First of all I'm not sure if there is a better way to implement server-client comunication. So far I have implemented a server which updates the game state every 0.5 seconds and sends the information to all the clients. You can try my current prototype here: https://hexpose.appspot.com

With respect to local development where the 0.5 seconds rounds are very regular, playing on the public server you see that the pace is not regular... I think this is due to a variable latency in server-client comunication.

Suppose I have many players moving on an arena like in this game. The superhex original gameplay is very fluid, you see enemies move on smooth curves. How this can be achieved? The position of enemies is known later (because of client-server-client latency) than the position of my player. But collision are anyway correctly detected. Is it just a matter of very slow latency and good server infrastructure or it depends on game logic implementation?

\$\endgroup\$
  • 1
    \$\begingroup\$ The server might not send the position of the enemies with every update but also information about their trajectory, so that the client can interpolate the movement in between. That might explain the smooth curve look and feel while not needing very low latencies. Not sure if it is done like this though. \$\endgroup\$ – Trilarion May 11 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.