Answer the question
In order to leave comments, you need to log in
How to implement multiplayer on socket.io?
Good afternoon, I have a question, how is threading organized in multiplayer games?
For example, there are two object tanks controlled by two players. What is the best and most convenient way to implement multiplayer? When to send activity data? At the moment I see two options for logic:
Answer the question
In order to leave comments, you need to log in
For any actions, pour data about the state of objects into the database (whichever you know best), when data enters the database, notify all connected clients about these states, and render positions based on this data. Before saving to the database, check for cheats (can there be such a state?).
Send data only for actions, respectively.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question