Hello,
I’m in the beginning of writing a multiplayer RPG and thought that this is a nice chance to contribute to the engine via the planned templates for some genres. It should contain lag-compensated multiplayer abitlities and a potentially huge world (so including a workaround for potential precision loss).
I have to admit that I’ll need your help to really do “best practice”. I’m quite experienced in Java and 2D Games but I’m not that much experienced in JME (yet).
I would like to start with some questions:
1)Concerning AppStates:
Of course I would have one AppState that loads the terrain. Would it make sense/be possible to add one terrain loading state for every connected player on serverside? Or in general one AppState for every player? (Maybe the terrain part is to specialized for a template but in my interest anyway^^)
2)Concerning precision loss:
I read a lot about using double for the logical state of objects and of course that sounds good but I’m not quite sure how that works in combination with bullet? (I don’t want to make my own Bullet-double-version like Empire did). Would I have to subdivide the world into different sectors with different Physic Spaces?
3)About Lag Prevention:
I read the Valve Articles about lag prevention and they read:
Then the server moves all other players - only players - back to where they were at the command execution time. The user command is executed and the hit is detected correctly. After the user command has been processed, the players revert to their original positions.

s://developer.valvesoftware.com/w/images/c/ca/Lag_compensation.jpg
https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking
To be honest I have no clue how to do that when Animation and Physics have to be set to an earlier state... (Would it make sense to copy the last two or three physic states which were calculated by the server and go from them to the time when the user fired/hit/or whatever else?)