I'm designing a game where the map has 1 M tiles. The game is simple, is a 2D game with low graphic requirements and without player movements, only change states, so I don't need to update player positions for example. But I have a doubt about how to synchronize the map.
When a client connects, the server should send him data related with proximity tiles. Each tile is represented with a different picture, so I can represent them with an id (integer). Developing in c#, each tile requires 4 bytes to store the id. So when the client connects, I have to send him (4 bytes*number of tiles). Sending data of 1000 tiles (a 30x30 grid), I'm sending 4 kb, and this is just in the first connection. When the client player moves, I have to send him more and more data, which has not a good performance.
On the other hand, if I store all the ids in the client, I will need to store 1M*4 byte = 4 mb per client. This is just to store tile ids, but it seems to be ok.
How can I design or optimize the data messaging ?