I have a program in which I am using an ObjectStream over sockets. Code for the class Im sending looks like the following.
class Snake{
Point[] p = new Point[50];
Direction move;
public int length;
int score;
String player;
Color snakecolor;
boolean gameover;
//Other Functions go here//
}
This Class is sent repeatedly over the socket. However its showing a bit of lag. Would it make that much of a difference if instead of sending the Color object I send an RGB code(integer values)? How could I possibly make my program lag free?