From: Ian Jackson Date: Sat, 27 Jun 2020 22:33:55 +0000 (+0100) Subject: proposed protocol? X-Git-Tag: otter-0.2.0~1520 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=64ee69467847aa339a89e161fbd28608c4214d2c;p=otter.git proposed protocol? --- diff --git a/NOTES b/NOTES new file mode 100644 index 00000000..8bacd564 --- /dev/null +++ b/NOTES @@ -0,0 +1,62 @@ +protocol + + +all in context of a piece + + + client server + + <------------------- + some update + piece + gen + your doing ? + +at start of op + note picee.gen = gen + + grab, or move, or something: + -------------------> + grab/move/ungrab + piece + piece.gen + if piece.gen == msg.piece.gen + then set piece.last_client + + if piece.last_client == client + then ok + + otherwise bad + send nothing! a message + must be in the queue already! + + <------------------- + soem update + piece + gen + your doing ? + +if "your doing" +ignore the message, we are up to date, +but set the piece's gen + +otherwise +cancel any drag for the piece +reset the piece state to that specified + + +-------------------------------------------------- + +client maintains + for each piece + [ game state ] + gen (last from server) + x, y, held + overall + [ ui state ] + what are we dragging, drag start, click state, etc. + +server maintains + for each piece + gen + client list etc.