So I've got the basic server and client set up for my game. (C# using XNA, lidgren for networking). I can connect and send/receive integers, which is great. You obviously can't typecast whole objects as bytes and transfer them, though.
My game is set up (as I assume most games are) as a list of entities. Each entity has data like position, current frame, etc. that are important to drawing them to the client screens. Here are my options transferring data from server to client, unless there's a (hopefully) easier way:
1) Traverse the entity list on the server, write only data important to the client to the message, and then upon receiving the data, the client traverses the list and backwards engineers the level before drawing it.
2) For each client, draw the level on the server and somehow send the pixel data so the client can draw it (I have no idea how to do this)
3) Maybe there is a way to send whole objects in messages.
Please tell me if I'm on the right track and thank you in advance!