Show Sidebar

MMO Concept

Virtual worlds have a virtual space that exists within coordinates. 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 interest area.

Photon Server: MMO Interest Area

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).

Photon Server: MMO Interest Area

Item pushes events through the region where this item currently is. Once specific interest area overlaps region it automatically subscribes to region's event channel and starts receiving this region events including those pushed by items. To avoid frequent subscribe and unsubscribe changes on interest area border an additional larger interest area radius was introduced: Subscribed regions that cross this outer radius are unsubscribed, the client stops receiving the region events.

Photon Server: MMO Interest Area

 To Document Top