Multiuser Sketchpad
mrdoob.com
mrdoob.com
https://docs.google.com/drawings/edit?id=1ViOs4u4_uaPoDzwnd4...
also read the related blog post ~ http://mrdoob.com/blog/post/701
Any ideas on how?
1. Collecting changes and sending them every 75-100 ms. Instead of as soon as the occur.
2. Deltas: If the mouseX is 800 and in the next frame is 801, Just send 800,1 and reconstruct the data on the peers side (800,1,-1,2,-3).
3. I the value is 0, don't write it. "1,,1"
These are client side. Now I need to take a look at the server code..
My heavily-unoptimized wire protocol used uncompressed JSON objects sent at each mousemove event on the canvas while drawing, which means it's great fun on the LAN, but would choke any affordable Internet link.
It appears that this one solves the problem by limiting the rate at which you can draw—drag the mouse too fast, and it lifts the pencil.
The actual "fix" for your problem was to collect commands (mouseMoves) and send them every 75ms instead of sending a command every mouse move. There is also some simple delta stuff to save on BW
I was considering doing some sort of curve-fitting to (lossily) compress the drawing commands. Sending a couple points to describe a quadratic or Bézier curve is a lot nicer than hundreds of points to describe tiny line segments.
And, as luck would have it, <canvas> draws both natively! :)
Brushes, private rooms, etc? Probably still wouldn't be too useful, but a great proof-of-concept.