   Best way to send map data?
  Alright, before I start with my post I'd just like to apologize if you do not think this is the right forum. It's kind of a mix as, I want to know which way is fastest for checking things locally, but also how and when to send said data. Anyways, on with the post.Currently working on a little trinket of an MMORPG and I'm just curious what the best way to read, save, and send map data would be. I mean there are a few ways. Have a tile* array[][], vector<Tile*>, Hell I could even do map<vector,Tile*>. It's a simple 2D MMORPG using TCP/IP, just so you know. And also, when a player logs in I plan to send all map data within their view (and a bit out for smooth walking), but should I have it so when a part of map updates (player tosses item infront of other player), that I update the entire view again or just that one tile, or how do you recommend going about this? I assume just updating the 1 tile, but I'm just being safe as I'm going for as much optimization as I can here for a good clean server. Thanks for your time!-Etyrn   
  You mean the location of something(character, object, etc.) on a map?It sounds to me as if movement was tile based, not pixel based. XD However, since I guess your movement is pixel based, I would guess that you would send the X and Y location of the object on the map, which would replace the previous data about the location.Of course each object would need some way of being identified, maybe something like an ID. The server could create an ID for each object, that way the client can identify an object.Maybe you could add also a type. For example types could be 'item' or 'character' and the client would know how to read the information depending on the type. Or maybe you could have it based on actions, for example an action could be 'move' and since everything in your world would have only X-axis and Y-axis posible locations you could apply it to anything, and guide the client by the ID.So a way could be: ID(four bytes), DATA TYPE(one or two bytes), X POS(two bytes), Y POS(two bytes).There are other things to make the movement look smooth but after that just updating the images should be enough for now.Was that helpful?   ;  Well, actually it is tile based. Basically, I have class "Tile", and they're stored in a <insert need for help here>. The client reads I pressed the left arrow key, and checks the Tile sent to client to the left, if it can "walk" on the itemID there, then it moves to there and then sends a request to the server to make it official, and then the server sends a bad note back if something goes wrong. I.E., if your internet craps out while playing you can move one square in any valid direction on *your* screen, and no further. I hope that made sense. Anyways, I already have things like items, players, stacked inside vectors, and each "Tile" class has one of these. Like I said, I'm mainly curious of what the best way to store and access these tiles like getTile(x, y); and getTile could iterate through a vector, just return tiles[x][y] or whatever. Even so, thanks for trying to help me. Effort counts. ;)-Etyrn   ;  I suppose you will have a server for you're mmorpg. The server can manage the map, and hold all the relavent state info.each client could request cell info.client_map (class) :: get_cell ( cell_ID ); // makes call to server to update own state.TCP_PACKET { TCP/IP HEADER ; MMORPG HEADER ; _get_cell ; cell ID } _HEADERINFORMATION_______________ FUNCTION __ ARGUMENTSERVER :: return to sender - cell_infoTCP_PACKET { TCP/IP HEADER ; MMORPG HEADER ; _receive_cell ; cell_info }   _HEADERINFORMATION_______________ FUNCTION __ ARGUMENT   cell_info can be a struct with all kinds of interesting possibilities   bool has_axe   bool has_gold   short gold   or you could even find a way to translate a dynamic list with different items or states in to a file, then transmit the file over via packet.CLIENT :: get_cell (cell_ID)\\ process packetyou will have to have mechanisms for processing packets, and ensuring integrity among the internet traffic. relate to them like files (packets) and process them like, to keep a standard interface.---------------------------------------------[RESOURCES]http://java.sun.com/docs/books/tutorial/networking/sockets/index.htmlhttp://www.sockets.com/http://tangentsoft.net/wskfaq/