I am currently developing a game that includes a server and some clients. Currently, the server does its work based on user input then draws the image the clients should see and sends it. Unfortunately, the server's time is taken up almost exclusively by the drawing and encoding. Is there a better way for me to design this?
OK, the obvious answers would be:
Don't do drawing on the server. Just have the server tell the client what it needs to draw and let the client handle the actual drawing.
Have the client keep track of the information it's previously received, so that the server only needs to send it a list of changes rather than sending everything again.
Have the client predict (as far as possible) what will change based on the player's actions, so that the server only needs to send it any changes the client doesn't already know about (such as those caused by actions of other players).
Yeah, I know that's not very specific, but neither is your question. If there's something in particular that you'd like more detail about, you can comment or edit your question to tell us what it is.