I'm creating a 2d minecraft style game, where the map is stored in an 2 dimensional int array. You can place and destroy blocks and ai-controlled characters will walk around the map. The game's made using xna/c#. The problem is that i don't have much experience coding networked games.
Which protocol should i use? UDP, TCP? Or perhaps the lidgren library? (which uses UDP + reliability)
Should i let the following things be done on the client, server or on both?
- ai/pathfinding
- collision detection
Also, is it good practice to send destroy and place-block messages to the server? I guess that when the client starts, it first needs tot download the map. And then changes to the map will be made in paralell to the maps on the clients and the one on the server....
Finally, should i broadcast the positions of the characters only when they change (tends towards TCP) or should i continually send them (tends towards UDP)?
Any help is usefull :)
Thanks in advance.
PS: sorry about the bad quality of my english (i'm dutch)