I took a little time to try to put in image how I think the engine should work. There are no new concepts but it is maybe the first time that someone put this on a paper. I dit it mainly for my comprehension, but also in order to share our design ideas.
The main principles that have been adopted:
- The server and all the players will run a bullet simulation.
- The server is authoritative for the World and the simulation.
- The server will run the simulation on all the world in absolute coordinates (double precision), while the players will run a simulation in relative coordinates (single precision).
- To run the simulation, only movement caused by players are used as input after validation by the server. The server use all the movements, while the players simulation use only movements caused by players around them.
- A parallel process will synchronize entities between server and players, after selection, transformation in player relative coordinate, and conversion in float.
- The initial coordinate of the player in its own simulation is the center (0,0,0), and the player will move in its own coordinate system. The center of the coordinate system is moved if the player goes far away, with an entity update round if necessary.
- The network layer and crontrollers have not been mentioned for clarity.
Being in holiday starting tomorrow, I will not be able to update the drawing before 2 weeks. I leave it for comments and future reference if it is still valid.
NB: this PR
implements the PhysicalWorld with the (unfinished) "Model to User restriction and transformation" function that will run at boot time and after a "teleportation".