I'm making a side pictionary game. So pretty much I want the drawer to draw a picture using the paint object, and OINC will draw it on all the other player's computers. Here's my code:
+String of Drawer=OINC Name
+Mouse is in the paper
+User held down left mouse button
-Send text message [String(Xmouse)+"/"+String(Ymouse)] to channel 6 on OINC
+Message received on channel 6
+String of Drawer<>OINC Name
-Set source string to OINC recieved message (STRING PARSER)
-Set position of brush (PAINT)to X=First(String Parser), Y=Last (Sting Parser)
Problem is, the brush seems to not be in the same position as the original drawer. Also, it doesn't draw "smooth" like the original drawer. It draws in "bursts" if you know what I mean. How can I fix this?
What you could try to do is set up some kind of system that will purposely make the images show up about 2 or 3 seconds slower on other computers. Then whenever you start drawing the picture, start a timer and have it constantly adding up. Include that number in with the messages being sent, and have all the other clients have a similar counter and store all received messages until the timer hits the appropriate number and then fires the appropriate paint response.
This will help compensate for some lag by creating a buffer between when the messages are all received and when the picture is created, and it doesn't give anyone a significant advantage because everyone will have the same amount of lag time. This also allows the picture to be drawn out almost exactly as smoothly as it was drawn by the original creator.