1

So I have a game that runs on runs on html5 canvas using a game engine (ImpactJS to be exact, yeah too old)

And I have this scenario where:

After a set time (i.e. 15 seconds), game will communicate to the server.

IF:

Player A made the call, player B should not be able to make another one. Vice versa.

What I tried to do is to set a flag whenever a player makes the call to try and prevent the other player to make a new one, but I am having a problem if both players make the call at the same time

Is my only option is to make the timing come from the server, not the client (players)?

Do note also that the engine's update function runs 60/s or depending on the fps capability of the device.

Ardi
  • 131
  • 1
  • 10
  • One server to host them all, be it a server, or client hosting (as server) the game, one central control, else you create a peer-to-peer network which for most realtime games is far from ideal – Blindman67 May 10 '21 at 17:48

0 Answers0