   Networking strategy - need comments.
  I''m working on a 2d mmorpg - at the moment trying to flesh out a feasible network strategy.These are my ideas so far:Server has the sole responsibility for the actions of gameobjects - including players. The clients can only send commands to the server.Server sends messages to the client every time a relevant gameobject changes state - and every time new gameobjects become relevant to the client. (A gameobject''s state also includes speed and what position it''s heading for - therefore only changes in direction etc. triggers communication)One problem I have been struggling with was to determine which events were relevant for the client - Since the plan is to have a large world with lots of gameobjects I don''t want to waste bandwidth sending state-changes for objects several screens from the avatar.One way would of course be to have discrete zones that players can leave or enter (Like Diablo I)- but even within the zones I feel some pruning of information would be preferable.A solution I''m considering is to divide each zone into subzones like this: Each zone is an array of tiles (say 1000*1000), subzones will then be matrices of a smaller dimension. (say 30*30)The client then has as relevant objects all objects in it''s own subzone + the subzones surrounding it: a total of 9 subzones - a matrix of 3*3 subzones = 90*90 tiles.Problem: when subzone borders are crossed by the avatar new subzones become relevant. The gameobjects in these subzones are all unknown to the client and must therefore be initialized from the server.I would like to hear if anyone has comments on this - maybe tried something similar.Alternative solutions are very welcome.   ***For Java games and Java related resources, go to http://www.javaengines.dk*** 
  I think what you are talking about is a QuadTree. ;  Thanks  I''m doing some searching now for that subject, if anyone can elaborate on the subject or has a good reference I''ll be grateful. ;  Most MMO games don''t go by zones but by the location of the user. The server would send updates for all events within a specified radius from the user. You wouldn''t want to send events for the zone since that would probably include a good amount of irrelevent data. ;  You describe a data structure of 1000*1000 zones of 30*30 subzone, isn't ?  Even if you stock only 1 byte by subzone, you have a memory use of 1000*1000*30*30 = 900000000 byte = 858Mb.  Ouch. Onebeer solution sound better.   [edited by - Arsouille on February 12, 2004 10:16:38 AM];  No, the example only meant 1000X1000 tiles. Then a subdivision of these tiles into 30x30 tile subzones (). Basically it''s a way of indexing the information to easily determine the clients for which an event is relevant.    ***For Java games and Java related resources, go to http://www.javaengines.dk*** 