Virtual worlds (IWorld) have a virtual space that exists within coordinates. Each coordinate is represented by a 3D Vector. A set of coordinates define an area (IArea). Entities located in this virtual space are called Item. Clients define the area (position and extent) they are interested in and should only “see” items within the boundaries of this InterestArea.
The calculation of which items fall into which interest areas can be very CPU intensive, especially if the items and interest areas are frequently moving. An easy way to accelerate this calculation is to divide the virtual space into fixed Regions and then calculate which regions overlap with the interest area. The client should receive all events of the items in these overlapping regions. The most simple algorithm uses a grid of square tiles (known as Square Tile Algorithm).
Once an item appears within the boundaries of a specific interest area the interest area automatically subscribes the client’s peer to the item’s event channel. The client receives all events published by (or through) the item from this moment on. Since an item that moves near the border of an interest area would cause frequent subscribe and unsubscribe changes an additional larger interest area radius was introduced: Subscribed items that cross this outer radius are unsubscribed, the client stops receiving the item events.