Game database will have few collections with map data. Any map data entry has field "loc {x, y}" - object with x,y subfields. They have mongo geospatial indexes to fast finding that by use place. All geo tables names are fallowing convenction "map.*", for sample:
map.chars, map.objects
Exception is a main world table (with static world) - it is named just "map".
We need game object class that will looking for all objects on specific map collection that fit some criteria. At start it should provide function to find all documents in specific range from point x,y - sample funciton definition:
public function inDistance(x, y, distance);
Class should name Localizer (or similar). It will be used as other objects extension, so function names should be short.
It should be possible that class looking for documents in more than one table. In this case results should be grouped.
Game database will have few collections with map data. Any map data entry has field "loc {x, y}" - object with x,y subfields. They have mongo geospatial indexes to fast finding that by use place. All geo tables names are fallowing convenction "map.*", for sample: map.chars, map.objects Exception is a main world table (with static world) - it is named just "map". We need game object class that will looking for all objects on specific map collection that fit some criteria. At start it should provide function to find all documents in specific range from point x,y - sample funciton definition: public function inDistance(x, y, distance); Class should name Localizer (or similar). It will be used as other objects extension, so function names should be short. It should be possible that class looking for documents in more than one table. In this case results should be grouped.