I
I
im_sama2021-06-24 11:26:29
HTML
im_sama, 2021-06-24 11:26:29

How to make an online game?

Please tell me the direction of movement in order to realize our plans.
I want to make an online multiplayer game.
The bottom line is this, there is a countdown from 10 to 0, then the game starts, a graph begins to be drawn and a number is generated, as soon as the number is generated, the algorithm starts again.
I did this for one user.
How to make this algorithm work not for one user, but for everyone who logged in?
And so that it works in real time, that is, if the user went to the site, he displayed a countdown not from 10, but from 3 (example), or even the game started.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Zapunny, 2021-06-24
@evgzap

Generate a number on the server, send it to clients via sockets, and discard the time step for one, and you will be happy

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question