Answer the question
In order to leave comments, you need to log in
Server for 2D real-time game?
I am using node.js + socket.io. I didn’t have any experience before, so I want to listen to critics, because I’m sure that my approach to developing the server architecture is wrong.
In general, how everything works:
1). Each frame the client sends data about the pressed keys to the server.
2). The client listens to the arrival of information from the server regarding game objects and does the following: old data is shoved into P0, new data into P1.
3). Linear interpolation is used using known P1 and P0.
4). The server processes keystrokes and game logic every 16 milliseconds.
5). The server sends all game data to all clients every 48 milliseconds.
How can this be improved?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question