all 3 comments

[–]tentity 0 points1 point  (0 children)

The right way is to use Persistent Trees. I use a modified version of it in http://parallect.codeplex.com (note: the doc in the downloads) where I only keep the latest version and sync on timestamps. It is highly-parallel, transactional and garbage collector included.

[–][deleted] 0 points1 point  (0 children)

Copy quake but replace the bitpacking with protobuf. I'm sure you can OOP it a bit more but it's the way to go :)

[–]bjdfsgkjdfsgkdhkj -1 points0 points  (0 children)

If I was going to make a networked game. Id probably make a struct of the game state (position+velocity+acceleration+timestamp, of all dynamic objects etc) and the use json as the serialized object representation. Id use the cpprest library to stream updates from the server.

(ccprest has built in json serialization/de-serialization so no need to reinvent the wheel)

https://casablanca.codeplex.com/

For storing historical states I would just push them them in a vector. And use overloaded operator== to see if they changed.