I currently have a piece of coursework that requires 3 or more 3d simulations connected via p2p to maintain a simulation that is visually consistent amoung all peers. A big issue is that I'm not allowed to use any form of authoritative server/peer logic and I'm struggling with potential designs.
The coursework has the following relavant constraints
- each peer must be connected at the start and will have the same initial empty simulation
- The network will be LAN only
- Hardware is consistent in all computers in the network
I'm thinking about implementing it along the lines of
- Each peer will regularly create a snapshot of all objects that have moved since the last snapshot
- Each peer will maitain a local copy of the snapshot in addition to broadcasting it to all other peers
- Each peer will combine the other snapshots possibly via averaging and and adding it to the current local state. I'm thinking I could also possibly use timestamps of each snapshot to weight the combination.
- each peer runs their local simulation briefly then repeat the process
Can anybody see any potential problems with this or recommend anything?